diff --git a/code/client/impax/src/states/profileState.ts b/code/client/impax/src/states/profileState.ts index f88f17e1..8c6eb968 100644 --- a/code/client/impax/src/states/profileState.ts +++ b/code/client/impax/src/states/profileState.ts @@ -29,10 +29,9 @@ export const useLoginState = create()((set) => ({ loginInfo: {teamId: "", teamName: "", email: ""}, setLoginInfo: (loginInfo) => set({ loginInfo: loginInfo}), tokens: {accessToken: "", refreshToken: ""}, - setTokens: (tokens) => set((prevState)=>{ prevState.tokens = tokens; - localStorage.setItem('accessToken', tokens.accessToken); - localStorage.setItem('refreshToken', tokens.refreshToken); - return prevState;}) + setTokens: (tokens) => {set({tokens: tokens}); + localStorage.setItem("accessToken", tokens.accessToken); + localStorage.setItem("refreshToken", tokens.refreshToken);} ,