Solved some problems, bypassed some stuff

This commit is contained in:
Tiago Ribeiro
2024-09-08 11:35:09 +01:00
parent e3847baadb
commit 620e4dd787
23 changed files with 1259 additions and 1538 deletions

View File

@@ -28,7 +28,7 @@ export const getServerSideProps = withIronSessionSsr(({req, res}) => {
envVariables[x] = process.env[x]!;
});
if (user && user.isVerified) {
if (user) {
return {
redirect: {
destination: "/",
@@ -56,7 +56,7 @@ export default function Login() {
});
useEffect(() => {
if (user && user.isVerified) router.push("/");
if (user) router.push("/");
}, [router, user]);
const forgotPassword = () => {
@@ -173,7 +173,7 @@ export default function Login() {
</span>
</>
)}
{user && !user.isVerified && <EmailVerification user={user} isLoading={isLoading} setIsLoading={setIsLoading} />}
{/* {user && !user.isVerified && <EmailVerification user={user} isLoading={isLoading} setIsLoading={setIsLoading} />} */}
</section>
</main>
</>