Skip to content

Commit

Permalink
⚙️ chore: 불필요한 코드 제거
Browse files Browse the repository at this point in the history
  • Loading branch information
dongree committed Dec 3, 2024
1 parent 7f88e6b commit b098e53
Showing 1 changed file with 0 additions and 10 deletions.
10 changes: 0 additions & 10 deletions FE/src/store/useAuthStore.ts
Original file line number Diff line number Diff line change
@@ -1,25 +1,15 @@
import { create } from 'zustand';

type AuthStore = {
accessToken: string | null;
isLogin: boolean;
setAccessToken: (token: string) => void;
setIsLogin: (isLogin: boolean) => void;
resetToken: () => void;
};

const useAuthStore = create<AuthStore>((set) => ({
accessToken: null,
isLogin: false,
setIsLogin: (isLogin: boolean) => {
set({ isLogin });
},
setAccessToken: (token: string) => {
set({ accessToken: token, isLogin: token !== null });
},
resetToken: () => {
set({ accessToken: null, isLogin: false });
},
}));

export default useAuthStore;

0 comments on commit b098e53

Please sign in to comment.