Skip to content

Commit 703ef2c

Browse files
authored
add 10-minute auto-refresh for token login (#5788)
1 parent 2d0a956 commit 703ef2c

File tree

1 file changed

+2
-1
lines changed
  • projects/app/src/components/Layout

1 file changed

+2
-1
lines changed

projects/app/src/components/Layout/auth.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,14 @@ const Auth = ({ children }: { children: JSX.Element | React.ReactNode }) => {
2626
useQuery(
2727
[router.pathname],
2828
() => {
29-
if (unAuthPage[router.pathname] === true || userInfo) {
29+
if (unAuthPage[router.pathname] === true) {
3030
return null;
3131
} else {
3232
return initUserInfo();
3333
}
3434
},
3535
{
36+
refetchInterval: 10 * 60 * 1000,
3637
onError(error) {
3738
console.log('error->', error);
3839
router.replace(

0 commit comments

Comments
 (0)