Added redirects() function to next.config.js, changed Settings url

This commit is contained in:
Alex van Andel committed 2021-05-07 15:04:56 +00:00
1 parent 17b880335a
commit d2ca59adb8
3 files changed
+10 -20

No files matched your search

-19
View File
@@ -1,19 +0,0 @@
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";
}
}
router.replace('/settings/profile');
return null;
}