Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
hbjORbj committed Dec 28, 2024
1 parent e76a459 commit 12cfaf4
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 4 deletions.
8 changes: 8 additions & 0 deletions apps/web/modules/d/[link]/d-type-view.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import { Booker } from "@calcom/atoms/monorepo";
import { getBookerWrapperClasses } from "@calcom/features/bookings/Booker/utils/getBookerWrapperClasses";
import { BookerSeo } from "@calcom/features/bookings/components/BookerSeo";

import { type PageProps } from "@lib/d/[link]/[slug]/getServerSideProps";

Expand All @@ -19,6 +20,13 @@ export default function Type({
}: PageProps) {
return (
<main className={getBookerWrapperClasses({ isEmbed: !!isEmbed })}>
<BookerSeo
username={user}
eventSlug={slug}
rescheduleUid={booking?.uid}
hideBranding={isBrandingHidden}
entity={entity}
/>
<Booker
username={user}
eventSlug={slug}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,17 +1,28 @@
"use client";

import type { EmbedProps } from "app/WithEmbedSSR";

import { Booker } from "@calcom/atoms/monorepo";
import { getBookerWrapperClasses } from "@calcom/features/bookings/Booker/utils/getBookerWrapperClasses";
import { BookerSeo } from "@calcom/features/bookings/components/BookerSeo";

import type { getServerSideProps } from "@lib/org/[orgSlug]/instant-meeting/team/[slug]/[type]/getServerSideProps";
import type { inferSSRProps } from "@lib/types/inferSSRProps";
import type { EmbedProps } from "app/WithEmbedSSR";

export type PageProps = inferSSRProps<typeof getServerSideProps> & EmbedProps;

function Type({ slug, user, booking, isEmbed, isBrandingHidden, entity, eventTypeId, duration }: PageProps) {
return (
<main className={getBookerWrapperClasses({ isEmbed: !!isEmbed })}>
<BookerSeo
username={user}
eventSlug={slug}
rescheduleUid={undefined}
hideBranding={isBrandingHidden}
isTeamEvent
entity={entity}
bookingData={booking}
/>
<Booker
username={user}
eventSlug={slug}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { useSearchParams } from "next/navigation";
import { useEffect, useState } from "react";
import { z } from "zod";

Expand Down Expand Up @@ -37,7 +36,6 @@ export function useInitialFormValues({
prefillFormParams,
lastBookingResponse,
}: UseInitialFormValuesProps) {
const searchParams = useSearchParams();
const [initialValues, setDefaultValues] = useState<{
responses?: Partial<z.infer<ReturnType<typeof getBookingResponsesSchema>>>;
bookingId?: number;
Expand Down Expand Up @@ -141,7 +139,6 @@ export function useInitialFormValues({
name,
username,
prefillFormParams,
searchParams,
]);

// When initialValues is available(after doing async schema parsing) or session is available(so that we can prefill logged-in user email and name), we need to reset the form with the initialValues
Expand Down

0 comments on commit 12cfaf4

Please sign in to comment.