File tree Expand file tree Collapse file tree 2 files changed +5
-15
lines changed
Expand file tree Collapse file tree 2 files changed +5
-15
lines changed Original file line number Diff line number Diff line change @@ -45,14 +45,6 @@ function RequireAuth({
4545 }
4646 } , [ ] ) ;
4747
48- useEffect ( ( ) => {
49- const checkToken = async ( ) => {
50- const result = await refreshToken ( ) ;
51- } ;
52-
53- // checkToken();
54- } , [ refreshToken , router ] ) ;
55-
5648 useEffect ( ( ) => {
5749 if ( categories . length > 0 ) {
5850 setCurrentTheme ( categories . map ( ( { id, title } ) => ( { id, title } ) ) ) ;
Original file line number Diff line number Diff line change @@ -83,13 +83,11 @@ export const setSelectedThemeId = (themeId: number) => {
8383// 필요하다면 한번에 가져오는 함수도 만들 수 있습니다
8484export const getLoginInfo = ( ) : LoginInfo => {
8585 return {
86- accessToken : getLocalStorage ( ACCESS_TOKEN ) as string ,
87- refreshToken : getLocalStorage ( REFRESH_TOKEN ) as string ,
88- shopName : getLocalStorage ( SHOP_NAME ) as string ,
89- adminCode : getLocalStorage ( ADMIN_CODE ) as string ,
90- accessTokenExpiresIn : getLocalStorage (
91- ACCESS_TOKEN_EXPIRES_IN
92- ) as unknown as number ,
86+ accessToken : getLocalStorage ( ACCESS_TOKEN ) || "" ,
87+ refreshToken : getLocalStorage ( REFRESH_TOKEN ) || "" ,
88+ shopName : getLocalStorage ( SHOP_NAME ) || "" ,
89+ adminCode : getLocalStorage ( ADMIN_CODE ) || "" ,
90+ accessTokenExpiresIn : Number ( getLocalStorage ( ACCESS_TOKEN_EXPIRES_IN ) ) || 0 ,
9391 } ;
9492} ;
9593export const getStatus = ( ) => getLocalStorage ( STATUS ) ;
You can’t perform that action at this time.
0 commit comments