Solved some problems, bypassed some stuff
This commit is contained in:
@@ -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>
|
||||
</>
|
||||
|
||||
Reference in New Issue
Block a user