Fix: lock timezone on booking page breaks atoms (#23060)

* fix: eventTypeSettings atom crashed on enabling `Lock timezone on booking page`

* add changelog
This commit is contained in:
Somay Chauhan authored and GitHub committed 2025-08-13 13:03:35 +00:00
1 parent b7fda31678
commit 293dd1a140
3 files changed
+33 -20

No files matched your search

@@ -1,4 +1,4 @@
import { useState, Suspense } from "react";
import { useState, Suspense, useMemo } from "react";
import type { Dispatch, SetStateAction } from "react";
import { Controller, useFormContext } from "react-hook-form";
import type { z } from "zod";
@@ -10,9 +10,10 @@ import {
SelectedCalendarSettingsScope,
SelectedCalendarsSettingsWebWrapperSkeleton,
} from "@calcom/atoms/selected-calendars/wrappers/SelectedCalendarsSettingsWebWrapper";
import { Timezone as PlatformTimzoneSelect } from "@calcom/atoms/timezone";
import getLocationsOptionsForSelect from "@calcom/features/bookings/lib/getLocationOptionsForSelect";
import DestinationCalendarSelector from "@calcom/features/calendars/DestinationCalendarSelector";
import { TimezoneSelect } from "@calcom/features/components/timezone-select";
import { TimezoneSelect as WebTimezoneSelect } from "@calcom/features/components/timezone-select";
import useLockedFieldsManager from "@calcom/features/ee/managed-event-types/hooks/useLockedFieldsManager";
import {
allowDisablingAttendeeConfirmationEmails,
@@ -565,6 +566,10 @@ export const EventAdvancedTab = ({
userEmail = removePlatformClientIdFromEmail(userEmail, platformContext.clientId);
}
const TimezoneSelect = useMemo(() => {
return isPlatform ? PlatformTimzoneSelect : WebTimezoneSelect;
}, [isPlatform]);
return (
<div className="flex flex-col space-y-4">
<calendarComponents.CalendarSettings