mirror of
https://github.com/streetwriters/notesnook.git
synced 2025-12-23 15:09:33 +01:00
web: use sqlite for storing editor session data
This commit is contained in:
committed by
Abdullah Atta
parent
1eb80ccc88
commit
c98bddd35b
@@ -42,7 +42,7 @@ import { NoteContent } from "@notesnook/core/dist/collections/session-content";
|
||||
import { Context } from "../components/list-container/types";
|
||||
import { showToast } from "../utils/toast";
|
||||
import { getId } from "@notesnook/core/dist/utils/id";
|
||||
import { createJSONStorage } from "zustand/middleware";
|
||||
import { PersistStorage } from "zustand/middleware";
|
||||
import { getFormattedHistorySessionDate } from "@notesnook/common";
|
||||
import { isCipher } from "@notesnook/core/dist/database/crypto";
|
||||
import { hashNavigate } from "../navigation";
|
||||
@@ -976,7 +976,7 @@ const useEditorStore = createPersistedStore(EditorStore, {
|
||||
return sessions;
|
||||
}, [] as EditorSession[])
|
||||
}),
|
||||
storage: createJSONStorage(() => localStorage)
|
||||
storage: db.config() as PersistStorage<Partial<EditorStore>>
|
||||
});
|
||||
export { useEditorStore, SESSION_STATES };
|
||||
|
||||
|
||||
Reference in New Issue
Block a user