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 1425e65..169f329 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 @@ -74,7 +74,8 @@ fun AppNavigator() { index = favorite.userIndex, navAccueil ={ navController.navigate( Accueil(favorite.userIndex) ) }, navQuiz = { navController.navigate(QuizMenu(favorite.userIndex)) }, - navProfil = { navController.navigate(Profil(favorite.userIndex)) } + navProfil = { navController.navigate(Profil(favorite.userIndex)) }, + navQuote = {navController.navigate(Quote)} ) } composable{ val profil:Profil = it.toRoute() diff --git a/What_The_Fantasy/app/src/main/java/com/example/what_the_fantasy/ui/screens/FavoritePage.kt b/What_The_Fantasy/app/src/main/java/com/example/what_the_fantasy/ui/screens/FavoritePage.kt index c6ce095..2d34fb8 100644 --- a/What_The_Fantasy/app/src/main/java/com/example/what_the_fantasy/ui/screens/FavoritePage.kt +++ b/What_The_Fantasy/app/src/main/java/com/example/what_the_fantasy/ui/screens/FavoritePage.kt @@ -1,6 +1,7 @@ package com.example.what_the_fantasy.ui.screens import androidx.compose.foundation.background +import androidx.compose.foundation.clickable import androidx.compose.foundation.layout.Box import androidx.compose.foundation.layout.Column import androidx.compose.foundation.layout.Spacer @@ -26,7 +27,8 @@ fun FavoritePage( index: Int, navAccueil: (Int) -> Unit, navQuiz: (Int) -> Unit, - navProfil: (Int) -> Unit + navProfil: (Int) -> Unit, + navQuote:() -> Unit ) { NavBar( onFavorite = true, @@ -34,7 +36,7 @@ fun FavoritePage( navControllerFavorite = { }, navControllerAccueil = navAccueil, navControllerProfil = navProfil, - navControllerQuiz = navQuiz + navControllerQuiz = navQuiz , ) { Box( modifier = Modifier @@ -55,9 +57,12 @@ fun FavoritePage( horizontalAlignment = Alignment.CenterHorizontally ) { items(QuoteStub.allQuotes) { quote -> - LittleQuoteComponent(quote) + Column (Modifier.clickable { navQuote()}){ + LittleQuoteComponent(quote) + + Spacer(modifier = Modifier.height(16.dp)) + } - Spacer(modifier = Modifier.height(16.dp)) } } }