Skip to content

Commit

Permalink
fix: fix handle login error
Browse files Browse the repository at this point in the history
  • Loading branch information
xiejay97 committed May 30, 2024
1 parent 553463b commit 164fff6
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/app/routes/login/Login.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import type { PREV_ROUTE_KEY } from '../../configs/router';
import type { AppUser } from '../../types';
import type { AxiosError } from 'axios';

import { useStorage } from '@laser-pro/storage';
import {
Expand Down Expand Up @@ -70,9 +71,9 @@ export default function Login(): JSX.Element | null {
initUser(res.user);
navigate(isString(from) && from !== LOGIN_PATH ? from : '/', { replace: true });
})
.catch((err) => {
.catch((err: AxiosError) => {
DialogService.open(Toast, {
children: err,
children: err.message,
type: 'error',
});
})
Expand Down

0 comments on commit 164fff6

Please sign in to comment.