issue # 회원가입 화면 구현 중
This commit is contained in:
13
src/store/authStore.ts
Normal file
13
src/store/authStore.ts
Normal file
@@ -0,0 +1,13 @@
|
||||
import type { AuthData } from '@/data/AuthData';
|
||||
import { create } from 'zustand';
|
||||
|
||||
interface AuthStoreProps {
|
||||
authData: AuthData | undefined;
|
||||
login: (data: AuthData) => void;
|
||||
}
|
||||
|
||||
export const useAuthStore = create<AuthStoreProps>((set) => ({
|
||||
authData: undefined,
|
||||
login: (data: AuthData) => set({ authData: data }),
|
||||
logout: () => set({ authData: undefined })
|
||||
}));
|
||||
Reference in New Issue
Block a user