Refactored to use app folder.

This commit is contained in:
Mike Cao 2023-09-29 05:29:22 -07:00
parent 40cfcd41e9
commit 9a52cdd2e1
258 changed files with 2025 additions and 2258 deletions

20
src/app/sso/page.tsx Normal file
View file

@ -0,0 +1,20 @@
'use client';
import { useEffect } from 'react';
import { Loading } from 'react-basics';
import { useRouter } from 'next/navigation';
import { setClientAuthToken } from 'lib/client';
export default function ({ params }) {
const router = useRouter();
const { token, url } = params;
useEffect(() => {
if (url && token) {
setClientAuthToken(token);
router.push(url);
}
}, [router, url, token]);
return <Loading size="xl" />;
}