2021-04-07 15:03:02 +00:00
|
|
|
import { useRouter } from 'next/router';
|
|
|
|
import { signIn, useSession, getSession } from 'next-auth/client';
|
|
|
|
|
|
|
|
export default function Settings() {
|
|
|
|
const [ session, loading ] = useSession();
|
|
|
|
const router = useRouter();
|
|
|
|
|
|
|
|
if (loading) {
|
|
|
|
return <p className="text-gray-400">Loading...</p>;
|
|
|
|
} else {
|
|
|
|
if (!session) {
|
|
|
|
window.location.href = "/auth/login";
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-04-29 12:28:25 +00:00
|
|
|
router.replace('/settings/profile');
|
2021-04-07 15:03:02 +00:00
|
|
|
|
|
|
|
return null;
|
|
|
|
}
|