reps raised with correct return url

This commit is contained in:
2023-10-25 10:33:08 +01:00
parent fdf5be3415
commit f3da69dc75
5 changed files with 61 additions and 52 deletions
+8 -6
View File
@@ -10,7 +10,7 @@ import Footer from "../../components/footer";
import Header from "../../components/header";
import Case from "../../components/representation";
import { wrapper } from "../../store/store";
import { getSession, useSession } from "next-auth/react";
import { getSession, useSession, signIn } from "next-auth/react";
import {
consoleLogger,
getPersonalAccount,
@@ -69,11 +69,13 @@ const Home = (props) => {
if (status === "loading") {
return <NoSessionWarning loading={true} />;
}
if (status === "unauthenticated") {
router.push("/auth/signin");
return <NoSessionWarning />;
}
// console.log("unauthenticated path:", router.asPath);
// if (status === "unauthenticated") {
// console.log("unauthenticated path:", router.asPath);
// signIn("email", { callbackUrl: router.asPath });
// //router.push("/auth/signin");
// return <NoSessionWarning />;
// }
return (
<div>