Updated redirect implementation
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user