mirror of
https://github.com/AmruthPillai/Reactive-Resume.git
synced 2025-11-14 08:42:08 +10:00
refactor(v4.0.0-alpha): beginning of a new era
This commit is contained in:
17
apps/client/src/stores/openai.ts
Normal file
17
apps/client/src/stores/openai.ts
Normal file
@ -0,0 +1,17 @@
|
||||
import { create } from "zustand";
|
||||
import { persist } from "zustand/middleware";
|
||||
|
||||
interface OpenAIStore {
|
||||
apiKey: string | null;
|
||||
setApiKey: (apiKey: string | null) => void;
|
||||
}
|
||||
|
||||
export const useOpenAiStore = create<OpenAIStore>()(
|
||||
persist(
|
||||
(set) => ({
|
||||
apiKey: null,
|
||||
setApiKey: (apiKey) => set({ apiKey }),
|
||||
}),
|
||||
{ name: "openai" },
|
||||
),
|
||||
);
|
||||
Reference in New Issue
Block a user