mirror of
https://github.com/kikootwo/ReadMeABook.git
synced 2026-06-03 21:00:09 +00:00
fix(auth): redirect after login with token
This commit is contained in:
@@ -35,7 +35,7 @@ function TokenLoginContent() {
|
||||
localStorage.setItem('user', JSON.stringify(data.user));
|
||||
|
||||
setAuthData(data.user, data.accessToken);
|
||||
router.push('/');
|
||||
window.location.href = '/';
|
||||
})
|
||||
.catch(() => {
|
||||
router.replace('/login');
|
||||
|
||||
Reference in New Issue
Block a user