diff options
Diffstat (limited to 'src/common/stores/useAuthStore.ts')
| -rw-r--r-- | src/common/stores/useAuthStore.ts | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/common/stores/useAuthStore.ts b/src/common/stores/useAuthStore.ts new file mode 100644 index 0000000..b88cf0b --- /dev/null +++ b/src/common/stores/useAuthStore.ts @@ -0,0 +1,15 @@ +import { create } from "zustand"; +import { Credential } from "../types/auth"; + +type State = { + credentials: Credential | null | undefined; +}; + +type Action = { + setCredentials: (credentials: Credential | null) => void; +}; + +export const useAuthStore = create<State & Action>((set) => ({ + credentials: null, + setCredentials: (credentials) => set({ credentials }), +})); |
