feat: [CAL-910] Pre-select country for phone number (CALCOM-5759) (#9526)

Co-authored-by: gitstart-calcom <gitstart@users.noreply.github.com>
pull/9712/head
GitStart-Cal.com 2023-06-22 16:18:05 +08:00 committed by GitHub
parent e5fb19163e
commit 5952a38ab9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 3 deletions

View File

@ -64,9 +64,9 @@ const useDefaultCountry = () => {
refetchOnReconnect: false, refetchOnReconnect: false,
retry: false, retry: false,
onSuccess: (data) => { onSuccess: (data) => {
if (isSupportedCountry(data?.countryCode)) { isSupportedCountry(data?.countryCode)
setDefaultCountry(data.countryCode.toLowerCase()); ? setDefaultCountry(data.countryCode.toLowerCase())
} : setDefaultCountry(navigator.language.split("-")[1]?.toLowerCase() || "us");
}, },
}); });