migrate / index page (#18960)
This commit is contained in:
@@ -140,6 +140,7 @@ export const config = {
|
||||
// Next.js Doesn't support spread operator in config matcher, so, we must list all paths explicitly here.
|
||||
// https://github.com/vercel/next.js/discussions/42458
|
||||
matcher: [
|
||||
"/",
|
||||
"/403",
|
||||
"/500",
|
||||
"/icons",
|
||||
|
||||
@@ -1,19 +0,0 @@
|
||||
import type { GetServerSidePropsContext } from "next";
|
||||
|
||||
import { getServerSession } from "@calcom/features/auth/lib/getServerSession";
|
||||
|
||||
function RedirectPage() {
|
||||
return;
|
||||
}
|
||||
|
||||
export async function getServerSideProps({ req, res }: GetServerSidePropsContext) {
|
||||
const session = await getServerSession({ req, res });
|
||||
|
||||
if (!session?.user?.id) {
|
||||
return { redirect: { permanent: false, destination: "/auth/login" } };
|
||||
}
|
||||
|
||||
return { redirect: { permanent: false, destination: "/event-types" } };
|
||||
}
|
||||
|
||||
export default RedirectPage;
|
||||
Reference in New Issue
Block a user