import type { NextPageContext } from "next"; import dayjs from "@calcom/dayjs"; import { useLocale } from "@calcom/lib/hooks/useLocale"; import { detectBrowserTimeFormat } from "@calcom/lib/timeFormat"; import prisma, { bookingMinimalSelect } from "@calcom/prisma"; import { Button, HeadSeo } from "@calcom/ui"; import { FiArrowRight, FiCalendar, FiX } from "@calcom/ui/components/icon"; import type { inferSSRProps } from "@lib/types/inferSSRProps"; export default function MeetingUnavailable(props: inferSSRProps) { const { t } = useLocale(); return (
); } export async function getServerSideProps(context: NextPageContext) { const booking = await prisma.booking.findUnique({ where: { uid: context.query.uid as string, }, select: { ...bookingMinimalSelect, uid: true, user: { select: { credentials: true, }, }, references: { select: { uid: true, type: true, meetingUrl: true, }, }, }, }); if (!booking) { return { redirect: { destination: "/video/no-meeting-found", permanent: false, }, }; } const bookingObj = Object.assign({}, booking, { startTime: booking.startTime.toString(), endTime: booking.endTime.toString(), }); return { props: { booking: bookingObj, }, }; }