Commit 703ef2cd by heheer Committed by GitHub

add 10-minute auto-refresh for token login (#5788)

parent 2d0a956e
......@@ -26,13 +26,14 @@ const Auth = ({ children }: { children: JSX.Element | React.ReactNode }) => {
useQuery(
[router.pathname],
() => {
if (unAuthPage[router.pathname] === true || userInfo) {
if (unAuthPage[router.pathname] === true) {
return null;
} else {
return initUserInfo();
}
},
{
refetchInterval: 10 * 60 * 1000,
onError(error) {
console.log('error->', error);
router.replace(
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment