Added redirects() function to next.config.js, changed Settings url
This commit is contained in:
1 parent
17b880335a
commit
d2ca59adb8
3 files changed
+10
-20
No files matched your search
@@ -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;
|
||||
}
|
||||
Reference in new issue
Block a user