How to use the expo-localization.Localization.country function in expo-localization

To help you get started, we’ve selected a few expo-localization examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github leejh3224 / react-native-hello-talk / src / screens / Auth / register.tsx View on Github external
const user = navigation.getParam("userData");

      values.age = new Date().getFullYear() - values.birthday.getFullYear();
      delete values.birthday;

      if (user) {
        await firebase
          .database()
          .ref(`users/${user.uid}`)
          .set({
            ...values,
            description: "",
            profileImage: user.photoURL,
            lastActiveTime: Date.now(),
            country: Localization.country
          });

        navigation.navigate(getNavigationKey(["chat", "home"]));
      }
    } catch (error) {
      console.log(error);
    }
  };
github expo / expo / packages / expo / src / Localization.ts View on Github external
getCurrentDeviceCountryAsync() {
    warnDeprecated('getCurrentDeviceCountryAsync()', 'country');
    return Localization.country;
  },
  getCurrentLocaleAsync() {