feat(Auth): create useAuthStore hook representing auth store using zustand
This commit is contained in:
9
src/features/auth/model/stores/authStore/authStore.ts
Normal file
9
src/features/auth/model/stores/authStore/authStore.ts
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
import { create } from "zustand";
|
||||||
|
import type { AuthStore } from "../../types/store";
|
||||||
|
|
||||||
|
export const useAuthStore = create<AuthStore>()((set) => ({
|
||||||
|
user: undefined,
|
||||||
|
status: "idle",
|
||||||
|
setUser: (user) => set({ user }),
|
||||||
|
setStatus: (status) => set({ status }),
|
||||||
|
}));
|
||||||
Reference in New Issue
Block a user