Fallback to next app default language (en) when user didn't specify locale. (#16425)

This commit is contained in:
Kacper authored and GitHub committed 2024-08-30 21:37:10 +05:30
1 parent d19e3e53f0
commit 821843bc6c
2 files changed
+6 -2

No files matched your search

@@ -4,7 +4,7 @@ import { Controller, useForm } from "react-hook-form";
import { getUserAvatarUrl } from "@calcom/lib/getAvatarUrl";
import { useLocale } from "@calcom/lib/hooks/useLocale";
import { localeOptions } from "@calcom/lib/i18n";
import { defaultLocaleOption, localeOptions } from "@calcom/lib/i18n";
import { nameOfDay } from "@calcom/lib/weekday";
import {
Avatar,
@@ -76,7 +76,7 @@ export const UserForm = ({
{ value: "GOOGLE", label: "GOOGLE" },
{ value: "SAML", label: "SAML" },
];
const defaultLocale = defaultValues?.locale || localeOptions[0].value;
const defaultLocale = defaultValues?.locale || defaultLocaleOption.value;
const form = useForm<FormValues>({
defaultValues: {