diff --git a/packages/features/eventtypes/components/Locations.tsx b/packages/features/eventtypes/components/Locations.tsx index 21550e3d11..5231b766e1 100644 --- a/packages/features/eventtypes/components/Locations.tsx +++ b/packages/features/eventtypes/components/Locations.tsx @@ -107,6 +107,66 @@ const getLocationInfo = ({ return { locationAvailable, locationDetails }; }; +const LocationInput = (props: { + eventLocationType: EventLocationType; + defaultValue?: string; + index: number; + customClassNames?: LocationInputCustomClassNames; + disableLocationProp?: boolean; +}) => { + const { t } = useLocale(); + const { eventLocationType, index, customClassNames, disableLocationProp, ...remainingProps } = props; + if (eventLocationType?.organizerInputType === "text") { + const { defaultValue, ...rest } = remainingProps; + + return ( + { + return ( + + ); + }} + /> + ); + } else if (eventLocationType?.organizerInputType === "phone") { + const { defaultValue, ...rest } = remainingProps; + + return ( + { + return ( + + ); + }} + /> + ); + } + return null; +}; + const Locations: React.FC = ({ isChildrenManagedEventType, disableLocationProp, @@ -168,64 +228,6 @@ const Locations: React.FC = ({ locationOptions: props.locationOptions, }); - const LocationInput = (props: { - eventLocationType: EventLocationType; - defaultValue?: string; - index: number; - customClassNames?: LocationInputCustomClassNames; - }) => { - const { eventLocationType, index, customClassNames, ...remainingProps } = props; - if (eventLocationType?.organizerInputType === "text") { - const { defaultValue, ...rest } = remainingProps; - - return ( - { - return ( - - ); - }} - /> - ); - } else if (eventLocationType?.organizerInputType === "phone") { - const { defaultValue, ...rest } = remainingProps; - - return ( - { - return ( - - ); - }} - /> - ); - } - return null; - }; - const [showEmptyLocationSelect, setShowEmptyLocationSelect] = useState(false); const defaultInitialLocation = defaultValue || null; const [selectedNewOption, setSelectedNewOption] = useState( @@ -459,6 +461,7 @@ const Locations: React.FC = ({ eventLocationType={eventLocationType} index={index} customClassNames={customClassNames?.organizerContactInput?.locationInput} + disableLocationProp={disableLocationProp} />