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:
GitStart-Cal.comandgitstart-calcom authored and GitHub committed 2023-06-22 10:18:05 +02:00
1 parent e5fb19163e
commit 5952a38ab9
1 file changed
+3 -3
+3 -3
View File
@@ -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");
},
});