We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents a8c70d8 + accb526 commit b5ba05dCopy full SHA for b5ba05d
app/store/prompt.ts
@@ -1,7 +1,7 @@
1
import Fuse from "fuse.js";
2
-import { getLang } from "../locales";
3
-import { StoreKey } from "../constant";
4
import { nanoid } from "nanoid";
+import { StoreKey } from "../constant";
+import { getLang } from "../locales";
5
import { createPersistStore } from "../utils/store";
6
7
export interface Prompt {
@@ -147,6 +147,11 @@ export const usePromptStore = createPersistStore(
147
},
148
149
onRehydrateStorage(state) {
150
+ // Skip store rehydration on server side
151
+ if (typeof window === "undefined") {
152
+ return;
153
+ }
154
+
155
const PROMPT_URL = "./prompts.json";
156
157
type PromptList = Array<[string, string]>;
0 commit comments