diff options
| author | Paweł Bernaciak <pawelbernaciak@zohomail.eu> | 2024-01-20 11:03:44 +0100 |
|---|---|---|
| committer | Paweł Bernaciak <pawelbernaciak@zohomail.eu> | 2024-01-20 11:03:44 +0100 |
| commit | 363936641a31b0b508197d41bea1ce116931b5d4 (patch) | |
| tree | ff5faa88b40b79b71ce32e648ac0a1dcfeffb91c /frontend/src/stores.ts | |
| parent | 32180f5b46fe594b01c40ca1d837734b1be894d6 (diff) | |
Diffstat (limited to 'frontend/src/stores.ts')
| -rw-r--r-- | frontend/src/stores.ts | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/frontend/src/stores.ts b/frontend/src/stores.ts new file mode 100644 index 0000000..d5a7ffe --- /dev/null +++ b/frontend/src/stores.ts @@ -0,0 +1,12 @@ +import { create } from 'zustand'; +import { User } from './types'; + +interface UserStore { + user: User | undefined; + setUser: (user: User | undefined) => void; +} + +export const userStore = create<UserStore>()((set) => ({ + user: undefined, + setUser: (user) => set({ user: user }), +})); |
