feat: [CAL-910] Pre-select country for phone number (CALCOM-5759) (#9526)
Co-authored-by: gitstart-calcom <gitstart@users.noreply.github.com>
This commit is contained in:
1 parent
e5fb19163e
commit
5952a38ab9
1 file changed
+3
-3
@@ -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");
|
||||
},
|
||||
});
|
||||
|
||||
|
||||
Reference in new issue
Block a user