From 54d3102b9315dbf3000b1475e5cddf0c742b26e2 Mon Sep 17 00:00:00 2001 From: Kentin BRONGNIART Date: Fri, 28 Feb 2025 14:37:18 +0100 Subject: [PATCH] correction erreur de merge --- .../what_the_fantasy/ui/navigations/AppNavigator.kt | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/What_The_Fantasy/app/src/main/java/com/example/what_the_fantasy/ui/navigations/AppNavigator.kt b/What_The_Fantasy/app/src/main/java/com/example/what_the_fantasy/ui/navigations/AppNavigator.kt index e331f2c..529a1dc 100644 --- a/What_The_Fantasy/app/src/main/java/com/example/what_the_fantasy/ui/navigations/AppNavigator.kt +++ b/What_The_Fantasy/app/src/main/java/com/example/what_the_fantasy/ui/navigations/AppNavigator.kt @@ -111,8 +111,12 @@ fun AppNavigator() { val userIndex = it.arguments?.getString("userIndex")?.toInt() ?: -1 QuizMenu( index = userIndex, - navAccueil = { navController.navigate(Destination.Accueil.route) }, - navFavorite = { navController.navigate(Destination.Favorite.route) }, + navAccueil = { userIndex -> + navController.navigate(Destination.Accueil.createRoute(userIndex)) // Passe l'index à Profil + }, + navFavorite = { userIndex -> + navController.navigate(Destination.Favorite.createRoute(userIndex)) // Passe l'index à Profil + }, navControllerQuiz = { navController.navigate(Destination.Quiz.route) }, navProfil = { userIndex -> navController.navigate(Destination.Profil.createRoute(userIndex)) // Passe l'index à Profil