Skip to content

Commit

Permalink
fix : LoginStore 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
BellYun committed Feb 21, 2025
1 parent 04190bb commit 380879b
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions frontend/src/store/LoginStore.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
import { create } from "zustand";

interface ResumeStore {
loginStatus: number;
setLoginStatus: (id: number) => void;
}

interface UserInfo {
username: string;
email: string;
Expand All @@ -11,6 +16,11 @@ interface UserInfoStore {
setUserData: (info: UserInfo) => void;
}

export const useLoginStatus = create<ResumeStore>((set) => ({
loginStatus: 0,
setLoginStatus: (id) => set({ loginStatus: id }),
}));

export const useUserInfo = create<UserInfoStore>((set) => ({
userData: null,
setUserData: (info) => set({ userData: info }),
Expand Down

0 comments on commit 380879b

Please sign in to comment.