Scheduling infrastructure for absolutely everyone.
fix: make cal video default value (#6716)
Nafees Nazik901d1f0e0127
diff --git a/apps/web/components/eventtype/EventSetupTab.tsx b/apps/web/components/eventtype/EventSetupTab.tsxindex c19ac334753..5783a5a8293 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<EventTypeSetupProps, "eventType" | "locationOptions" | "team" | "teamMembers">) => {@@ -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 (<div className="w-full">{validLocations.length === 0 && (