File tree 4 files changed +4
-4
lines changed
4 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -38,7 +38,7 @@ export default function ApiErrorBoundary({
38
38
case 401 :
39
39
case 403 :
40
40
toast . error ( message ) ;
41
- sessionStorage . setItem ( 'isLogin' , 'false' ) ;
41
+ localStorage . setItem ( 'isLogin' , 'false' ) ;
42
42
redirect ( RoutePath . Home ) ;
43
43
break ;
44
44
default :
Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ export default function useLogout() {
10
10
const mutation = useMutation ( {
11
11
mutationFn : authApi . LOGOUT ,
12
12
onSuccess : ( ) => {
13
- sessionStorage . clear ( ) ;
13
+ localStorage . clear ( ) ;
14
14
navigate ( RoutePath . Home ) ;
15
15
location . reload ( ) ;
16
16
} ,
Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ export const AuthServerRedirectNavigate = () => {
6
6
const navigate = useNavigate ( ) ;
7
7
8
8
useEffect ( ( ) => {
9
- sessionStorage . setItem ( 'isLogin' , 'true' ) ;
9
+ localStorage . setItem ( 'isLogin' , 'true' ) ;
10
10
navigate ( RoutePath . Dashboard ) ;
11
11
} , [ navigate ] ) ;
12
12
Original file line number Diff line number Diff line change 1
1
export const isAuthenticated = ( ) => {
2
- const isLogin = sessionStorage . getItem ( 'isLogin' ) ;
2
+ const isLogin = localStorage . getItem ( 'isLogin' ) ;
3
3
4
4
return isLogin === 'true' ;
5
5
} ;
You can’t perform that action at this time.
0 commit comments