2022-02-10 10:44:46 +00:00
|
|
|
import { NextPageContext } from "next";
|
2021-09-22 19:52:38 +00:00
|
|
|
|
2022-02-11 22:20:10 +00:00
|
|
|
import { getSession } from "@lib/auth";
|
|
|
|
|
2021-08-02 18:04:06 +00:00
|
|
|
function RedirectPage() {
|
2021-09-23 08:49:17 +00:00
|
|
|
return;
|
2021-07-15 14:10:26 +00:00
|
|
|
}
|
2021-08-02 18:04:06 +00:00
|
|
|
|
2022-02-10 10:44:46 +00:00
|
|
|
export async function getServerSideProps(context: NextPageContext) {
|
2021-09-23 08:49:17 +00:00
|
|
|
const session = await getSession(context);
|
|
|
|
if (!session?.user?.id) {
|
|
|
|
return { redirect: { permanent: false, destination: "/auth/login" } };
|
2021-08-02 18:04:06 +00:00
|
|
|
}
|
2021-09-23 08:49:17 +00:00
|
|
|
|
|
|
|
return { redirect: { permanent: false, destination: "/event-types" } };
|
|
|
|
}
|
2021-08-02 18:04:06 +00:00
|
|
|
|
|
|
|
export default RedirectPage;
|