e2e 수정
CI / test (push) Successful in 4m48s
CI / e2e (push) Has been skipped
CI / pr_and_merge (push) Successful in 1m30s

This commit is contained in:
2025-12-07 13:59:32 +09:00
parent eb78359b10
commit 96fa34cd86
56 changed files with 115 additions and 22 deletions
+14
View File
@@ -412,6 +412,20 @@ function EditorPageInner() {
contentJson: blocks,
};
window.localStorage.setItem(localKey, JSON.stringify(payload));
// 1-1) autosave 스냅샷도 현재 저장된 상태로 동기화해,
// 이후 /editor?slug 또는 /preview?slug 진입 시 서버 저장본과 동일한 블록들이 로드되도록 맞춘다.
try {
const autosaveKey = `pb:autosave:${slug}`;
const autosavePayload = {
blocks,
projectConfig,
savedByUserId: authUserId ?? null,
};
window.localStorage.setItem(autosaveKey, JSON.stringify(autosavePayload));
} catch {
// autosave 저장 실패는 치명적이지 않으므로 무시한다.
}
}
// 2) 서버에도 저장 (백업/공유용)