diff --git a/data/src/main/java/com/teamwiney/data/network/model/response/TasteAnalysis.kt b/data/src/main/java/com/teamwiney/data/network/model/response/TasteAnalysis.kt index cd6d5b5..e883003 100644 --- a/data/src/main/java/com/teamwiney/data/network/model/response/TasteAnalysis.kt +++ b/data/src/main/java/com/teamwiney/data/network/model/response/TasteAnalysis.kt @@ -48,7 +48,7 @@ fun TasteAnalysis.toDomain() = TasteAnalysis( avgPrice = this.avgPrice, recommendCountry = this.recommendCountry, recommendVarietal = this.recommendVarietal, - recommendWineType = convertTypeToSpecies(this.recommendWineType), + recommendWineType = this.recommendWineType, taste = this.taste, top3Type = this.top3Type.map { top3Type -> Top3Type(convertTypeToColor(top3Type.type), top3Type.percent) @@ -60,18 +60,6 @@ fun TasteAnalysis.toDomain() = TasteAnalysis( buyAgainCnt = this.buyAgainCnt ) -private fun convertTypeToSpecies(type: String): String { - return when (type) { - "RED" -> "레드 와인" - "ROSE" -> "로제 와인" - "WHITE" -> "화이트 와인" - "SPARKLING" -> "스파클링 와인" - "FORTIFIED" -> "포트 와인" - "OTHER" -> "기타 와인" - else -> "기타 와인" - } -} - private fun convertTypeToColor(type: String): String { return when (type) { "RED" -> "레드" diff --git a/feature/home/src/main/java/com/teamwiney/analysis/AnalysisResultScreen.kt b/feature/home/src/main/java/com/teamwiney/analysis/AnalysisResultScreen.kt index fe57b64..eaaf8d1 100644 --- a/feature/home/src/main/java/com/teamwiney/analysis/AnalysisResultScreen.kt +++ b/feature/home/src/main/java/com/teamwiney/analysis/AnalysisResultScreen.kt @@ -107,7 +107,7 @@ fun AnalysisResultScreen( ) Text( - text = "\"${analysisData.recommendCountry}의 ${analysisData.recommendVarietal} 품종으로 만든 ${analysisData.recommendWineType}\"", + text = "\"${analysisData.recommendCountry}의 ${analysisData.recommendVarietal} 품종으로 만든 ${convertTypeToSpecies(analysisData.recommendWineType)}\"", style = WineyTheme.typography.title2, color = WineyTheme.colors.main_3, textAlign = TextAlign.Center, @@ -203,3 +203,15 @@ fun AnalysisResultScreen( } } } + +private fun convertTypeToSpecies(type: String): String { + return when (type) { + "RED" -> "레드 와인" + "ROSE" -> "로제 와인" + "WHITE" -> "화이트 와인" + "SPARKLING" -> "스파클링 와인" + "FORTIFIED" -> "포트 와인" + "OTHER" -> "기타 와인" + else -> "기타 와인" + } +} \ No newline at end of file diff --git a/feature/home/src/main/java/com/teamwiney/analysis/component/pagercontent/WineTasteContent.kt b/feature/home/src/main/java/com/teamwiney/analysis/component/pagercontent/WineTasteContent.kt index ea3dc58..667080d 100644 --- a/feature/home/src/main/java/com/teamwiney/analysis/component/pagercontent/WineTasteContent.kt +++ b/feature/home/src/main/java/com/teamwiney/analysis/component/pagercontent/WineTasteContent.kt @@ -1,5 +1,6 @@ package com.teamwiney.analysis.component.pagercontent +import android.util.Log import androidx.compose.foundation.background import androidx.compose.foundation.layout.Arrangement import androidx.compose.foundation.layout.Box @@ -31,6 +32,8 @@ fun WineTasteContent( wineType: WineType, tastes: Taste ) { + Log.d("WineTasteContent", "wineType: $wineType, progress: $progress, tastes: $tastes") + Column( modifier = Modifier.fillMaxSize(), horizontalAlignment = Alignment.CenterHorizontally