Updated redirect implementation

This commit is contained in:
Joao Ramos
2024-03-11 17:00:38 +00:00
parent 330c177ff9
commit 37c3c6f7f4
14 changed files with 111 additions and 150 deletions

View File

@@ -31,15 +31,12 @@ export const getServerSideProps = withIronSessionSsr(({ req, res }) => {
});
if (user && user.isVerified) {
res.setHeader("location", "/");
res.statusCode = 302;
res.end();
return {
props: {
user: null,
envVariables,
},
};
redirect: {
destination: "/",
permanent: false,
}
};
}
return {