Update tsconfigs
This commit is contained in:
parent
608c26c763
commit
ee4916893e
4 changed files with 10 additions and 24 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