firtname and lastname before username

This commit is contained in:
2025-10-22 12:01:32 +02:00
parent 91163b8a75
commit a33e2ed555
16 changed files with 495 additions and 75 deletions
+2 -8
View File
@@ -20,7 +20,7 @@ import { background } from "../assets";
import GradientButton from "../components/GradientButton.js";
import { Input } from "../components/Input.js";
import ItemContainer from "../components/ItemContainer/ItemContainer";
import firebase, { usersRef } from "../config/firebase";
import firebase from "../config/firebase";
import {
GOOGLE_ANDROID_CLIENT_ID,
GOOGLE_IOS_CLIENT_ID,
@@ -63,13 +63,7 @@ export default ({ navigation }) => {
const afterLoginNavigate = async () => {
const uid = firebase.auth().currentUser?.uid;
if (!uid) throw new Error("Aucun utilisateur après connexion");
const snap = await usersRef.doc(uid).get();
const hasUserName = !!snap.data()?.userName;
if (hasUserName) {
navigation.reset({ index: 0, routes: [{ name: Routes.BottomTab }] });
} else {
navigation.reset({ index: 0, routes: [{ name: Routes.CreatePseudo }] });
}
navigation.reset({ index: 0, routes: [{ name: Routes.BottomTab }] });
};
const onLogin = async () => {