Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
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);
}
};
getCurrentDeviceCountryAsync() {
warnDeprecated('getCurrentDeviceCountryAsync()', 'country');
return Localization.country;
},
getCurrentLocaleAsync() {