2021-09-23 08:49:17 +00:00
|
|
|
import { getSession } from "@lib/auth";
|
2021-09-22 19:52:38 +00:00
|
|
|
|
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
|
|
|
|
2021-09-23 08:49:17 +00:00
|
|
|
export async function getServerSideProps(context) {
|
|
|
|
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;
|