Let's just build at runtime

This commit is contained in:
zomars committed 2022-06-15 21:19:13 -06:00
1 parent 673633a773
commit 3ae35a3b5d
1 file changed
+2 -20
+2 -20
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" };
};