Skip to content

Commit

Permalink
fix : build error
Browse files Browse the repository at this point in the history
  • Loading branch information
jasper200207 committed Aug 21, 2024
1 parent a72e116 commit 3be8ff8
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/atom.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,18 @@
/* eslint-disable import/prefer-default-export */
import { atomWithStorage } from 'jotai/utils';

type UserAtomType = {
memberId: number;
token: string;
isLogin: boolean;
};

export const defaultUserAtom = {
memberId: 0,
token: '',
isLogin: false,
} as const;

export const userAtom = atomWithStorage('user', defaultUserAtom);
export const userAtom = atomWithStorage('user', defaultUserAtom as UserAtomType);

export const loginBackPathAtom = atomWithStorage('loginBackPath', '/');

0 comments on commit 3be8ff8

Please sign in to comment.