From 4d8747065ea6d801cc6fa4cbd7918ecce15d2396 Mon Sep 17 00:00:00 2001 From: KwakEuiJin Date: Thu, 12 Oct 2023 03:14:21 +0900 Subject: [PATCH] [feature/review_star_view]: add Review detail --- .../ui/review/detail/ReviewDetailScreen.kt | 55 +++++++++++-------- 1 file changed, 32 insertions(+), 23 deletions(-) diff --git a/presentation/src/main/java/com/everymeal/presentation/ui/review/detail/ReviewDetailScreen.kt b/presentation/src/main/java/com/everymeal/presentation/ui/review/detail/ReviewDetailScreen.kt index e863a3f3..c46f04de 100644 --- a/presentation/src/main/java/com/everymeal/presentation/ui/review/detail/ReviewDetailScreen.kt +++ b/presentation/src/main/java/com/everymeal/presentation/ui/review/detail/ReviewDetailScreen.kt @@ -60,35 +60,44 @@ fun ReviewDetailScreen() { userName = "햄식이", ratingList = mockRatingList ) - Box( + FoodImage( modifier = Modifier .fillMaxWidth() .aspectRatio(1f) .padding(top = 24.dp) - ) { - Image( - modifier = Modifier.fillMaxSize(), - painter = painterResource(id = R.drawable.food_ex_2), - contentDescription = "more" - ) - LocationButton( - modifier = Modifier - .align(Alignment.BottomStart) - .padding( - start = 16.dp, - bottom = 16.dp - ) + ) + } + } +} + +@Composable +private fun FoodImage( + modifier: Modifier = Modifier +) { + Box( + modifier = modifier + ) { + Image( + modifier = Modifier.fillMaxSize(), + painter = painterResource(id = R.drawable.food_ex_2), + contentDescription = "more" + ) + LocationButton( + modifier = Modifier + .align(Alignment.BottomStart) + .padding( + start = 16.dp, + bottom = 16.dp ) - PageInfo( - modifier = Modifier - .align(Alignment.BottomEnd) - .padding( - end = 16.dp, - bottom = 16.dp - ) + ) + PageInfo( + modifier = Modifier + .align(Alignment.BottomEnd) + .padding( + end = 16.dp, + bottom = 16.dp ) - } - } + ) } }