TDD,E2E 개선, 미적용 스타일 개선
CI / test (push) Failing after 2m54s
CI / e2e (push) Has been skipped
CI / pr_and_merge (push) Has been skipped

This commit is contained in:
2025-12-07 09:52:42 +09:00
parent e726f43f7c
commit a5b432fb7b
167 changed files with 7397 additions and 663 deletions
+25
View File
@@ -0,0 +1,25 @@
import type { Block } from "@/features/editor/state/editorStore";
interface PublicProjectSnapshot {
slug: string;
title: string;
contentJson: Block[];
}
function getStore(): Map<string, PublicProjectSnapshot> {
const g = globalThis as any;
if (!g.__PB_PUBLIC_PROJECTS) {
g.__PB_PUBLIC_PROJECTS = new Map<string, PublicProjectSnapshot>();
}
return g.__PB_PUBLIC_PROJECTS as Map<string, PublicProjectSnapshot>;
}
export function cachePublicProject(snapshot: PublicProjectSnapshot): void {
const store = getStore();
store.set(snapshot.slug, snapshot);
}
export function getCachedPublicProject(slug: string): PublicProjectSnapshot | null {
const store = getStore();
return store.get(slug) ?? null;
}