Create flow cleanup

This commit is contained in:
adilallo
2026-04-11 00:29:15 -06:00
parent a5c6b8971f
commit 60d4ae6dfd
3 changed files with 21 additions and 10 deletions
+8 -5
View File
@@ -40,11 +40,14 @@ export default function CompletedPage() {
if (!stored) return;
const parsed = parseDocumentSectionsForDisplay(stored.document);
if (parsed.length === 0) return;
setDocumentSections(parsed);
setHeaderTitle(stored.title);
const sum =
typeof stored.summary === "string" ? stored.summary.trim() : "";
setHeaderDescription(sum.length > 0 ? sum : undefined);
// One-shot hydration from client-only storage after mount.
queueMicrotask(() => {
setDocumentSections(parsed);
setHeaderTitle(stored.title);
const sum =
typeof stored.summary === "string" ? stored.summary.trim() : "";
setHeaderDescription(sum.length > 0 ? sum : undefined);
});
}, []);
const toast = !toastDismissed ? (