Updates
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
import logoutUser from "@/src/functions/auth/logout-user";
|
||||
import Layout from "@/src/layouts/login";
|
||||
import H2 from "@/twui/components/layout/H2";
|
||||
import { GetServerSideProps } from "next";
|
||||
|
||||
export default function LogoutPage() {
|
||||
return (
|
||||
<Layout>
|
||||
<H2>Loging out ...</H2>
|
||||
</Layout>
|
||||
);
|
||||
}
|
||||
|
||||
export const getServerSideProps: GetServerSideProps = async (ctx) => {
|
||||
await logoutUser({ res: ctx.res });
|
||||
|
||||
return {
|
||||
redirect: {
|
||||
destination: `/login`,
|
||||
statusCode: 307,
|
||||
},
|
||||
};
|
||||
};
|
||||
Reference in New Issue
Block a user