Merge pull request #781 from toeverything/feature/refresh

feat: refresh can jump first workspace
This commit is contained in:
DarkSky 2023-02-06 01:58:56 +08:00 committed by GitHub
commit d359823f8e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -71,7 +71,7 @@ const AppDefender = ({ children }: PropsWithChildren) => {
const router = useRouter(); const router = useRouter();
useEffect(() => { useEffect(() => {
if (router.pathname === '/') { if (router.asPath === '/') {
router.replace('/workspace'); router.replace('/workspace');
} }
}, [router]); }, [router]);