Remove SSG prefetch
This commit is contained in:
1 parent
7122a4a91d
commit
b6dd0d5804
1 file changed
+1
-10
@@ -1,11 +1,10 @@
|
||||
import { UserPlan } from "@prisma/client";
|
||||
import { GetStaticPropsContext, GetStaticPaths } from "next";
|
||||
import { GetStaticPaths, GetStaticPropsContext } from "next";
|
||||
import { useEffect } from "react";
|
||||
import { JSONObject } from "superjson/dist/types";
|
||||
import { z } from "zod";
|
||||
|
||||
import { locationHiddenFilter, LocationObject } from "@calcom/app-store/locations";
|
||||
import dayjs from "@calcom/dayjs";
|
||||
import { useIsEmbed } from "@calcom/embed-core/embed-iframe";
|
||||
import { WEBAPP_URL } from "@calcom/lib/constants";
|
||||
import { getDefaultEvent, getGroupName, getUsernameList } from "@calcom/lib/defaultEvents";
|
||||
@@ -172,13 +171,6 @@ async function getUserPageProps(context: GetStaticPropsContext) {
|
||||
|
||||
const profile = eventType.users[0] || user;
|
||||
|
||||
const startTime = new Date();
|
||||
await ssg.fetchQuery("viewer.public.slots.getSchedule", {
|
||||
eventTypeId: eventType.id,
|
||||
startTime: dayjs(startTime).startOf("day").toISOString(),
|
||||
endTime: dayjs(startTime).endOf("day").toISOString(),
|
||||
});
|
||||
|
||||
return {
|
||||
props: {
|
||||
eventType: eventTypeObject,
|
||||
@@ -302,7 +294,6 @@ async function getDynamicGroupPageProps(context: GetStaticPropsContext) {
|
||||
const paramsSchema = z.object({ type: z.string(), user: z.string() });
|
||||
|
||||
export const getStaticProps = async (context: GetStaticPropsContext) => {
|
||||
console.log("STATIC CALL", context.params);
|
||||
const { user: userParam } = paramsSchema.parse(context.params);
|
||||
// dynamic groups are not generated at build time, but otherwise are probably cached until infinity.
|
||||
const isDynamicGroup = userParam.includes("+");
|
||||
|
||||
Reference in new issue
Block a user