2021-11-29 15:19:07 +01:00
|
|
|
import { GetServerSidePropsContext } from 'next'
|
|
|
|
import { getSession } from 'next-auth/react'
|
|
|
|
|
2022-11-15 09:35:48 +01:00
|
|
|
export default function Page() {
|
|
|
|
return null
|
2021-11-29 15:19:07 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
export const getServerSideProps = async (
|
|
|
|
context: GetServerSidePropsContext
|
|
|
|
) => {
|
|
|
|
const session = await getSession(context)
|
|
|
|
if (!session?.user) {
|
|
|
|
return { redirect: { permanent: false, destination: '/signin' } }
|
|
|
|
}
|
|
|
|
return { redirect: { permanent: false, destination: '/typebots' } }
|
|
|
|
}
|