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