From 3be8ff86b708a6c6a0d27c9f2aa134f3e5153ec3 Mon Sep 17 00:00:00 2001 From: gimdogyun Date: Thu, 22 Aug 2024 06:33:57 +0900 Subject: [PATCH] fix : build error - #293 --- src/atom.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) 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', '/');