diff --git a/apps/web/pages/booking/[uid].tsx b/apps/web/pages/booking/[uid].tsx index 66577403ca..f91e22c50f 100644 --- a/apps/web/pages/booking/[uid].tsx +++ b/apps/web/pages/booking/[uid].tsx @@ -1042,7 +1042,7 @@ export async function getServerSideProps(context: GetServerSidePropsContext) { const parsedQuery = querySchema.safeParse(context.query); - if (!parsedQuery.success) return { notFound: true }; + if (!parsedQuery.success) return { notFound: true } as const; const { uid, eventTypeSlug, seatReferenceUid } = parsedQuery.data; const { uid: maybeUid } = await maybeGetBookingUidFromSeat(prisma, uid); @@ -1100,7 +1100,7 @@ export async function getServerSideProps(context: GetServerSidePropsContext) { if (!bookingInfoRaw) { return { notFound: true, - }; + } as const; } const eventTypeRaw = !bookingInfoRaw.eventTypeId @@ -1109,7 +1109,7 @@ export async function getServerSideProps(context: GetServerSidePropsContext) { if (!eventTypeRaw) { return { notFound: true, - }; + } as const; } if (eventTypeRaw.seatsPerTimeSlot && !seatReferenceUid && !session) { @@ -1130,7 +1130,7 @@ export async function getServerSideProps(context: GetServerSidePropsContext) { if (!eventTypeRaw.owner) return { notFound: true, - }; + } as const; eventTypeRaw.users.push({ ...eventTypeRaw.owner, }); diff --git a/apps/web/pages/booking/[uid]/embed.tsx b/apps/web/pages/booking/[uid]/embed.tsx new file mode 100644 index 0000000000..5d6b405e57 --- /dev/null +++ b/apps/web/pages/booking/[uid]/embed.tsx @@ -0,0 +1,7 @@ +import withEmbedSsr from "@lib/withEmbedSsr"; + +import { getServerSideProps as _getServerSideProps } from "../[uid]"; + +export { default } from "../[uid]"; + +export const getServerSideProps = withEmbedSsr(_getServerSideProps);