diff --git a/apps/web/components/booking/pages/AvailabilityPage.tsx b/apps/web/components/booking/pages/AvailabilityPage.tsx
index 7a91f5e89c..ddee5ef675 100644
--- a/apps/web/components/booking/pages/AvailabilityPage.tsx
+++ b/apps/web/components/booking/pages/AvailabilityPage.tsx
@@ -36,7 +36,6 @@ import { yyyymmdd } from "@calcom/lib/date-fns";
import { useLocale } from "@calcom/lib/hooks/useLocale";
import { getRecurringFreq } from "@calcom/lib/recurringStrings";
import { localStorage } from "@calcom/lib/webstorage";
-import Loader from "@calcom/ui/Loader";
import DatePicker from "@calcom/ui/booker/DatePicker";
import { asStringOrNull } from "@lib/asStringOrNull";
@@ -155,7 +154,7 @@ const SlotPicker = ({
}) => {
const { selectedDate, setSelectedDate } = useDateSelected({ timeZone });
- const { i18n } = useLocale();
+ const { i18n, isLocaleReady } = useLocale();
const [startDate, setStartDate] = useState(new Date());
useEffect(() => {
@@ -188,7 +187,7 @@ const SlotPicker = ({
? "sm:w-1/2 sm:border-r sm:pl-4 sm:pr-6 sm:dark:border-gray-700 md:w-1/3 "
: "sm:pl-4")
}
- locale={i18n.language}
+ locale={isLocaleReady ? i18n.language : "en"}
includedDates={Object.keys(slots).filter((k) => slots[k].length > 0)}
selected={selectedDate}
onChange={setSelectedDate}
@@ -304,8 +303,8 @@ const AvailabilityPage = ({ profile, eventType }: Props) => {
const router = useRouter();
const isEmbed = useIsEmbed();
const { rescheduleUid } = router.query;
- const { isReady, Theme } = useTheme(profile.theme);
- const { t, i18n } = useLocale();
+ const { Theme } = useTheme(profile.theme);
+ const { t } = useLocale();
const { contracts } = useContracts();
const availabilityDatePickerEmbedStyles = useEmbedStyles("availabilityDatePicker");
const shouldAlignCentrallyInEmbed = useEmbedNonStylesConfig("align") !== "left";
@@ -354,10 +353,6 @@ const AvailabilityPage = ({ profile, eventType }: Props) => {
? "max-w-4xl"
: "max-w-3xl";
- if (Object.keys(i18n).length === 0) {
- return
- {profile.name} -
-
-
-
- {Object.values(AppStoreLocationType).includes(
- eventType.locations[0].type as unknown as AppStoreLocationType
- ) ? (
-
{profile.name}
+
+
+
+ {Object.values(AppStoreLocationType).includes(
+ eventType.locations[0].type as unknown as AppStoreLocationType
+ ) ? (
+
+ {eventType.locations.map((el, i, arr) => { + return ( + + {locationKeyToString(el, t)}{" "} + {arr.length - 1 !== i && ( + {t("or_lowercase")} + )} + + ); + })}
- )} - {eventType.locations.length > 1 && ( -- {eventType.locations.map((el, i, arr) => { - return ( - - {locationKeyToString(el, t)}{" "} - {arr.length - 1 !== i && ( - {t("or_lowercase")} - )} - - ); +
+
+ {getRecurringFreq({ t, recurringEvent: eventType.recurringEvent })} +
+ { + setRecurringEventCount(parseInt(event?.target.value)); + }} + /> ++ {t("occurrence", { + count: recurringEventCount, })}
-
- {getRecurringFreq({ t, recurringEvent: eventType.recurringEvent })} -
- { - setRecurringEventCount(parseInt(event?.target.value)); - }} - /> -- {t("occurrence", { - count: recurringEventCount, - })} -
-{
{eventType.description}
+{eventType.description}
+
- {Object.values(AppStoreLocationType).includes(
- eventType.locations[0].type as unknown as AppStoreLocationType
- ) ? (
-
+ {Object.values(AppStoreLocationType).includes(
+ eventType.locations[0].type as unknown as AppStoreLocationType
+ ) ? (
+
+ {eventType.locations.map((el, i, arr) => { + return ( + + {locationKeyToString(el, t)}{" "} + {arr.length - 1 !== i && ( + {t("or_lowercase")} + )} + + ); + })}
- )} - {eventType.locations.length > 1 && ( -- {eventType.locations.map((el, i, arr) => { - return ( - - {locationKeyToString(el, t)}{" "} - {arr.length - 1 !== i && ( - {t("or_lowercase")} - )} - - ); +
+
+ {getRecurringFreq({ t, recurringEvent: eventType.recurringEvent })} +
+ { + setRecurringEventCount(parseInt(event?.target.value)); + }} + /> ++ {t("occurrence", { + count: recurringEventCount, })}
-
+
- {getRecurringFreq({ t, recurringEvent: eventType.recurringEvent })} -
- { - setRecurringEventCount(parseInt(event?.target.value)); - }} - /> -- {t("occurrence", { - count: recurringEventCount, - })} -
-
-
{