mirror of
https://github.com/AmruthPillai/Reactive-Resume.git
synced 2025-11-14 08:42:08 +10:00
release: v4.1.0
This commit is contained in:
@ -1,16 +1,18 @@
|
||||
import { create } from "zustand";
|
||||
import { persist } from "zustand/middleware";
|
||||
|
||||
interface OpenAIStore {
|
||||
type OpenAIStore = {
|
||||
apiKey: string | null;
|
||||
setApiKey: (apiKey: string | null) => void;
|
||||
}
|
||||
};
|
||||
|
||||
export const useOpenAiStore = create<OpenAIStore>()(
|
||||
persist(
|
||||
(set) => ({
|
||||
apiKey: null,
|
||||
setApiKey: (apiKey) => set({ apiKey }),
|
||||
setApiKey: (apiKey) => {
|
||||
set({ apiKey });
|
||||
},
|
||||
}),
|
||||
{ name: "openai" },
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user