Let's just build at runtime

pull/3073/head^2
zomars 2022-06-15 17:17:29 -06:00
parent 673633a773
commit 3ae35a3b5d
1 changed files with 2 additions and 20 deletions

View File

@ -8,8 +8,8 @@ import { WEBAPP_URL } from "@calcom/lib/constants";
import { getDefaultEvent, getGroupName, getUsernameList } from "@calcom/lib/defaultEvents";
import { useLocale } from "@calcom/lib/hooks/useLocale";
import { parseRecurringEvent } from "@calcom/lib/isRecurringEvent";
import prisma from "@calcom/prisma";
import prisma from "@lib/prisma";
import { inferSSRProps } from "@lib/types/inferSSRProps";
import AvailabilityPage from "@components/booking/pages/AvailabilityPage";
@ -268,23 +268,5 @@ export const getStaticProps = async (context: GetStaticPropsContext) => {
};
export const getStaticPaths = async () => {
const users = await prisma.user.findMany({
select: {
username: true,
eventTypes: {
where: {
teamId: null,
},
select: {
slug: true,
},
},
},
});
const paths = users?.flatMap((user) =>
user.eventTypes.flatMap((eventType) => `/${user.username}/${eventType.slug}`)
);
return { paths, fallback: "blocking" };
return { paths: [], fallback: "blocking" };
};