docs and login direct

This commit is contained in:
archer
2023-04-28 14:16:30 +08:00
parent ca8e940c9b
commit 5969f5e0c5
3 changed files with 14 additions and 9 deletions

View File

@@ -34,7 +34,9 @@ const Auth = ({ children }: { children: JSX.Element }) => {
{
onError(error) {
console.log('error->', error);
router.replace('/login');
router.replace(
`/login?lastRoute=${encodeURIComponent(location.pathname + location.search)}`
);
toast();
},
onSettled() {