diff --git a/apps/web/components/booking/TimeOptions.tsx b/apps/web/components/booking/TimeOptions.tsx index ca50d265fb..f1c0e39443 100644 --- a/apps/web/components/booking/TimeOptions.tsx +++ b/apps/web/components/booking/TimeOptions.tsx @@ -1,10 +1,11 @@ import { FC, useEffect, useState } from "react"; -import TimezoneSelect, { ITimezoneOption } from "react-timezone-select"; import Switch from "@calcom/ui/Switch"; import { useLocale } from "@lib/hooks/useLocale"; +import TimezoneSelect, { ITimezoneOption } from "@components/ui/form/TimezoneSelect"; + import { is24h, timeZone } from "../../lib/clock"; type Props = { diff --git a/apps/web/components/ui/form/TimezoneSelect.tsx b/apps/web/components/ui/form/TimezoneSelect.tsx index fe500b216a..a6c9ac84d4 100644 --- a/apps/web/components/ui/form/TimezoneSelect.tsx +++ b/apps/web/components/ui/form/TimezoneSelect.tsx @@ -1,6 +1,11 @@ import classNames from "classnames"; import { components } from "react-select"; -import BaseSelect, { ITimezone, Props as SelectProps } from "react-timezone-select"; +import BaseSelect, { + allTimezones, + ITimezoneOption, + ITimezone, + Props as SelectProps, +} from "react-timezone-select"; import { InputComponent } from "@components/ui/form/Select"; @@ -28,6 +33,10 @@ function TimezoneSelect({ className, ...props }: SelectProps) { }, }), }} + timezones={{ + ...allTimezones, + "America/Asuncion": "Asuncion", + }} components={{ ...components, IndicatorSeparator: () => null, @@ -40,4 +49,4 @@ function TimezoneSelect({ className, ...props }: SelectProps) { } export default TimezoneSelect; -export type { ITimezone }; +export type { ITimezone, ITimezoneOption }; diff --git a/apps/web/ee/components/team/availability/TeamAvailabilityModal.tsx b/apps/web/ee/components/team/availability/TeamAvailabilityModal.tsx index 0b8ece47ce..43e5640d8b 100644 --- a/apps/web/ee/components/team/availability/TeamAvailabilityModal.tsx +++ b/apps/web/ee/components/team/availability/TeamAvailabilityModal.tsx @@ -1,7 +1,6 @@ import dayjs from "dayjs"; import utc from "dayjs/plugin/utc"; import React, { useState, useEffect } from "react"; -import TimezoneSelect, { ITimezone } from "react-timezone-select"; import { WEBSITE_URL } from "@calcom/lib/constants"; @@ -10,6 +9,7 @@ import { trpc, inferQueryOutput } from "@lib/trpc"; import Avatar from "@components/ui/Avatar"; import { DatePicker } from "@components/ui/form/DatePicker"; import Select from "@components/ui/form/Select"; +import TimezoneSelect, { ITimezone } from "@components/ui/form/TimezoneSelect"; import TeamAvailabilityTimes from "./TeamAvailabilityTimes"; diff --git a/apps/web/ee/components/team/availability/TeamAvailabilityScreen.tsx b/apps/web/ee/components/team/availability/TeamAvailabilityScreen.tsx index b03c937d42..fa5b6d61ee 100644 --- a/apps/web/ee/components/team/availability/TeamAvailabilityScreen.tsx +++ b/apps/web/ee/components/team/availability/TeamAvailabilityScreen.tsx @@ -1,6 +1,5 @@ import dayjs from "dayjs"; -import { CSSProperties, useEffect, useState } from "react"; -import TimezoneSelect, { ITimezone } from "react-timezone-select"; +import React, { useState, useEffect, CSSProperties } from "react"; import AutoSizer from "react-virtualized-auto-sizer"; import { FixedSizeList as List } from "react-window"; @@ -11,6 +10,7 @@ import { inferQueryOutput, trpc } from "@lib/trpc"; import Avatar from "@components/ui/Avatar"; import { DatePicker } from "@components/ui/form/DatePicker"; import Select from "@components/ui/form/Select"; +import TimezoneSelect, { ITimezone } from "@components/ui/form/TimezoneSelect"; import TeamAvailabilityTimes from "./TeamAvailabilityTimes"; diff --git a/apps/web/pages/getting-started.tsx b/apps/web/pages/getting-started.tsx index 807432a8c8..a5acb3ae49 100644 --- a/apps/web/pages/getting-started.tsx +++ b/apps/web/pages/getting-started.tsx @@ -14,7 +14,6 @@ import Head from "next/head"; import { useRouter } from "next/router"; import React, { useEffect, useRef, useState, useCallback } from "react"; import { useForm } from "react-hook-form"; -import TimezoneSelect from "react-timezone-select"; import * as z from "zod"; import getApps from "@calcom/app-store/utils"; @@ -38,6 +37,7 @@ import Loader from "@components/Loader"; import Schedule from "@components/availability/Schedule"; import { CalendarListContainer } from "@components/integrations/CalendarListContainer"; import Text from "@components/ui/Text"; +import TimezoneSelect from "@components/ui/form/TimezoneSelect"; import getEventTypes from "../lib/queries/event-types/get-event-types";