diff --git a/src/atom.ts b/src/atom.ts index 2e7dfae..82a5da9 100644 --- a/src/atom.ts +++ b/src/atom.ts @@ -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', '/');