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
parent
e5fb19163e
commit
5952a38ab9
|
@ -64,9 +64,9 @@ const useDefaultCountry = () => {
|
|||
refetchOnReconnect: false,
|
||||
retry: false,
|
||||
onSuccess: (data) => {
|
||||
if (isSupportedCountry(data?.countryCode)) {
|
||||
setDefaultCountry(data.countryCode.toLowerCase());
|
||||
}
|
||||
isSupportedCountry(data?.countryCode)
|
||||
? setDefaultCountry(data.countryCode.toLowerCase())
|
||||
: setDefaultCountry(navigator.language.split("-")[1]?.toLowerCase() || "us");
|
||||
},
|
||||
});
|
||||
|
||||
|
|
Loading…
Reference in New Issue