calcom/apps/web/pages/index.tsx
Omar López bcf40bbf26
Lint fixes (#1826)
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-02-11 22:20:10 +00:00

18 lines
449 B
TypeScript

import { NextPageContext } from "next";
import { getSession } from "@lib/auth";
function RedirectPage() {
return;
}
export async function getServerSideProps(context: NextPageContext) {
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;