diff --git a/apps/web/components/apps/installation/ConfigureStepCard.tsx b/apps/web/components/apps/installation/ConfigureStepCard.tsx index d4dcb787fd..95e7780324 100644 --- a/apps/web/components/apps/installation/ConfigureStepCard.tsx +++ b/apps/web/components/apps/installation/ConfigureStepCard.tsx @@ -7,6 +7,7 @@ import { useFieldArray, useFormContext } from "react-hook-form"; import { useForm } from "react-hook-form"; import { z } from "zod"; +import NoSSR from "@calcom/lib/components/NoSSR"; import { locationsResolver } from "@calcom/lib/event-types/utils/locationsResolver"; import { useLocale } from "@calcom/lib/hooks/useLocale"; import type { LocationObject } from "@calcom/lib/location"; @@ -188,7 +189,7 @@ const EventTypeGroup = ({ ); }; -export const ConfigureStepCard: FC = (props) => { +const ConfigureStepCardContent: FC = (props) => { const { loading, formPortalRef, handleSetUpLater } = props; const { t } = useLocale(); const { control, watch } = useFormContext(); @@ -221,60 +222,69 @@ export const ConfigureStepCard: FC = (props) => { } }, [submit, allUpdated, mainForSubmitRef]); - return ( - formPortalRef?.current && - createPortal( -
- {fields.map((group, groupIndex) => ( -
- {eventTypeGroups[groupIndex].eventTypes.some((eventType) => eventType.selected === true) && ( -
- -

{group.slug}

-
- )} - -
- ))} - - + if (!formPortalRef?.current) { + return null; + } -
- + return createPortal( +
+ {fields.map((group, groupIndex) => ( +
+ {eventTypeGroups[groupIndex].eventTypes.some((eventType) => eventType.selected === true) && ( +
+ +

{group.slug}

+
+ )} +
-
, - formPortalRef?.current - ) + ))} + + + +
+ +
+
, + formPortalRef.current + ); +}; + +export const ConfigureStepCard: FC = (props) => { + return ( + + + ); };