cal.pub0.org/pages/index.tsx

17 lines
391 B
TypeScript

import { getSession } from "@lib/auth";
function RedirectPage() {
return;
}
export async function getServerSideProps(context) {
const session = await getSession(context);
if (!session?.user?.id) {
return { redirect: { permanent: false, destination: "/auth/login" } };
}
return { redirect: { permanent: false, destination: "/event-types" } };
}
export default RedirectPage;