Moved suspense boundary.

This commit is contained in:
Mike Cao 2024-02-17 10:41:34 -08:00
parent fb72485f88
commit 709f46a391
2 changed files with 7 additions and 7 deletions

View File

@ -3,7 +3,6 @@ import { useEffect } from 'react';
import { Loading } from 'react-basics'; import { Loading } from 'react-basics';
import { useRouter, useSearchParams } from 'next/navigation'; import { useRouter, useSearchParams } from 'next/navigation';
import { setClientAuthToken } from 'lib/client'; import { setClientAuthToken } from 'lib/client';
import { Suspense } from 'react';
export default function SSOPage() { export default function SSOPage() {
const router = useRouter(); const router = useRouter();
@ -19,9 +18,5 @@ export default function SSOPage() {
} }
}, [router, url, token]); }, [router, url, token]);
return ( return <Loading />;
<Suspense>
<Loading />
</Suspense>
);
} }

View File

@ -1,5 +1,10 @@
import { Suspense } from 'react';
import SSOPage from './SSOPage'; import SSOPage from './SSOPage';
export default function () { export default function () {
return <SSOPage />; return (
<Suspense>
<SSOPage />
</Suspense>
);
} }