fix(editor): Task 6 round 1, draft store tests, dead rescue

This commit is contained in:
bchanot committed 2026-11-14 14:15:11 +01:00
1 parent f0e49fd447
commit 270444e2ec
4 files changed
+66 -4

No files matched your search

@@ -12,6 +12,9 @@ interface CitationDraftStore {
publish: (draft: CitationDraft | null) => void
}
// shortcut: module-level store because the citations sheet is a sibling of the finding
// dialog, so no React context reaches both. It holds one draft at a time (one edit form
// is open at once). Upgrade path: a provider above the dialog and the sheet.
export const useCitationDraft = create<CitationDraftStore>((set) => ({
draft: null,
publish: (draft) => set({ draft }),