diff --git a/apps/web/components/eventtype/EventSetupTab.tsx b/apps/web/components/eventtype/EventSetupTab.tsx index c19ac33475..5783a5a829 100644 --- a/apps/web/components/eventtype/EventSetupTab.tsx +++ b/apps/web/components/eventtype/EventSetupTab.tsx @@ -34,6 +34,16 @@ const getLocationFromType = ( } }; +const getDefaultLocationValue = (options: EventTypeSetupProps["locationOptions"], type: string) => { + for (const locationType of options) { + for (const location of locationType.options) { + if (location.value === type && location.disabled === false) { + return location; + } + } + } +}; + export const EventSetupTab = ( props: Pick ) => { @@ -138,7 +148,8 @@ export const EventSetupTab = ( return true; }); - const defaultValue = locationOptions.find((item) => item.label === "video")?.options; + const defaultValue = getDefaultLocationValue(locationOptions, "integrations:daily"); + return (
{validLocations.length === 0 && (