Skip to content

Commit

Permalink
[ fix ] persist user token
Browse files Browse the repository at this point in the history
  • Loading branch information
joohaem committed Jun 19, 2023
1 parent 802fa24 commit c25ed24
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/core/atom/auth.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ enum StateType {

export const userTokenAtom = atom<string | null>({
key: StateType.USER_TOKEN_ATOM,
default: null,
default: localStorage.getItem(USER_TOKEN) || null,
effects: [
({ onSet }) => {
onSet((newToken, _, isReset) => {
Expand Down

0 comments on commit c25ed24

Please sign in to comment.