Project structure update
This commit is contained in:
parent
86c616de0a
commit
e556cdceba
70 changed files with 4127 additions and 56 deletions
|
|
@ -1,21 +0,0 @@
|
|||
import { GetServerSideProps, GetServerSidePropsContext } from "next";
|
||||
import { getSession } from "next-auth/react";
|
||||
|
||||
export const checkAuth: GetServerSideProps = async (
|
||||
context: GetServerSidePropsContext
|
||||
) => {
|
||||
const session = await getSession(context);
|
||||
|
||||
if (!session) {
|
||||
return {
|
||||
redirect: {
|
||||
destination: "/login",
|
||||
permanent: false,
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
return {
|
||||
props: { session },
|
||||
};
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue