From de40d09da137a6a382ad7cb1823e5e756133fd4a Mon Sep 17 00:00:00 2001 From: dongchyeon Date: Fri, 26 Jul 2024 01:15:04 +0900 Subject: [PATCH] =?UTF-8?q?Fix=20:=20=ED=9A=8C=EC=9B=90=EA=B0=80=EC=9E=85?= =?UTF-8?q?=20=EC=99=84=EB=A3=8C=20=ED=99=94=EB=A9=B4=20=EB=A1=A4=EB=B0=B1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../teamwiney/auth/signup/SignUpNavigation.kt | 15 -- .../auth/signup/SignUpTasteResultScreen.kt | 156 ------------------ .../teamwiney/auth/signup/SignUpViewModel.kt | 11 +- 3 files changed, 1 insertion(+), 181 deletions(-) delete mode 100644 feature/auth/src/main/java/com/teamwiney/auth/signup/SignUpTasteResultScreen.kt diff --git a/feature/auth/src/main/java/com/teamwiney/auth/signup/SignUpNavigation.kt b/feature/auth/src/main/java/com/teamwiney/auth/signup/SignUpNavigation.kt index 33bb0a05..d90f4c24 100644 --- a/feature/auth/src/main/java/com/teamwiney/auth/signup/SignUpNavigation.kt +++ b/feature/auth/src/main/java/com/teamwiney/auth/signup/SignUpNavigation.kt @@ -54,20 +54,5 @@ fun NavGraphBuilder.signUpGraph( composable(route = AuthDestinations.SignUp.COMPLETE) { SignUpCompleteScreen(appState = appState) } - - composable(route = "${AuthDestinations.SignUp.TASTE_RESULT}?taste={taste}", - arguments = listOf( - navArgument("taste") { - type = NavType.StringType - defaultValue = "" - } - ) - ) { - val taste = it.arguments?.getString("taste") ?: "" - SignUpTasteResultScreen( - appState = appState, - taste = taste - ) - } } } \ No newline at end of file diff --git a/feature/auth/src/main/java/com/teamwiney/auth/signup/SignUpTasteResultScreen.kt b/feature/auth/src/main/java/com/teamwiney/auth/signup/SignUpTasteResultScreen.kt deleted file mode 100644 index 07da21a1..00000000 --- a/feature/auth/src/main/java/com/teamwiney/auth/signup/SignUpTasteResultScreen.kt +++ /dev/null @@ -1,156 +0,0 @@ -package com.teamwiney.auth.signup - -import androidx.compose.foundation.BorderStroke -import androidx.compose.foundation.Image -import androidx.compose.foundation.background -import androidx.compose.foundation.border -import androidx.compose.foundation.layout.Box -import androidx.compose.foundation.layout.Column -import androidx.compose.foundation.layout.IntrinsicSize -import androidx.compose.foundation.layout.fillMaxSize -import androidx.compose.foundation.layout.navigationBarsPadding -import androidx.compose.foundation.layout.padding -import androidx.compose.foundation.layout.statusBarsPadding -import androidx.compose.foundation.layout.width -import androidx.compose.foundation.shape.RoundedCornerShape -import androidx.compose.material3.Text -import androidx.compose.runtime.Composable -import androidx.compose.ui.Alignment -import androidx.compose.ui.Modifier -import androidx.compose.ui.draw.clip -import androidx.compose.ui.graphics.Brush -import androidx.compose.ui.graphics.Color -import androidx.compose.ui.res.painterResource -import androidx.compose.ui.unit.dp -import com.teamwiney.core.common.WineyAppState -import com.teamwiney.core.common.navigation.AuthDestinations -import com.teamwiney.core.common.navigation.HomeDestinations -import com.teamwiney.core.design.R -import com.teamwiney.ui.components.HeightSpacer -import com.teamwiney.ui.components.WButton -import com.teamwiney.ui.theme.WineyTheme - -@Composable -fun SignUpTasteResultScreen( - appState: WineyAppState, - taste: String -) { - - Column( - modifier = Modifier - .fillMaxSize() - .statusBarsPadding() - .navigationBarsPadding() - ) { - HeightSpacer(height = 68.dp) - - - Column(modifier = Modifier.padding(horizontal = 24.dp)) { - Text( - text = "이제 와인을\n마시러 가보실까요?", - style = WineyTheme.typography.title1, - color = WineyTheme.colors.gray_50 - ) - - Box( - modifier = Modifier - .fillMaxSize() - .weight(1f), - contentAlignment = Alignment.Center - ) { - WineTasteCard(taste = taste) - } - - WButton( - modifier = Modifier.padding(bottom = 30.dp), - text = "와이니 시작하기", - onClick = { - appState.navigate(HomeDestinations.ROUTE) { - popUpTo(AuthDestinations.SignUp.ROUTE) { - inclusive = true - } - } - } - ) - } - } -} - -@Composable -private fun WineTasteCard( - taste: String -) { - Box( - modifier = Modifier - .width(IntrinsicSize.Max) - .border( - BorderStroke( - 1.dp, brush = Brush.linearGradient( - colors = listOf( - Color(0xFF9671FF), - Color(0x109671FF), - ) - ) - ), - RoundedCornerShape(7.dp) - ) - .clip(RoundedCornerShape(7.dp)) - .background( - color = Color(0x993F3F3F), - shape = RoundedCornerShape(5.dp) - ), - contentAlignment = Alignment.Center - ) { - - Column( - modifier = Modifier.padding( - top = 44.dp, - bottom = 17.dp, - start = 20.dp, - end = 20.dp - ), - horizontalAlignment = Alignment.CenterHorizontally - ) { - Image( - painter = painterResource( - id = if (taste == "red") { - R.mipmap.img_taste_red_wine - } else { - R.mipmap.img_taste_white_wine - } - ), - contentDescription = null - ) - - HeightSpacer(height = 12.dp) - - Text( - modifier = Modifier - .background( - color = WineyTheme.colors.main_1, - shape = RoundedCornerShape(48.dp) - ) - .padding( - horizontal = 10.dp, - vertical = 3.dp - ), - text = if (taste == "red") "레드 와인" else "화이트 와인", - style = WineyTheme.typography.captionM1.copy(color = WineyTheme.colors.gray_50) - ) - - HeightSpacer(height = 17.dp) - - Text( - text = if (taste == "red") "산미의 중요성을 아는 와이너" else "향을 즐길 줄 아는 와이너", - style = WineyTheme.typography.bodyM1.copy(color = WineyTheme.colors.gray_50) - ) - - HeightSpacer(height = 9.dp) - - Text( - text = "담당자에게 해당 화면을 보여주세요!", - style = WineyTheme.typography.captionM1.copy(color = WineyTheme.colors.gray_700) - ) - } - } -} \ No newline at end of file diff --git a/feature/auth/src/main/java/com/teamwiney/auth/signup/SignUpViewModel.kt b/feature/auth/src/main/java/com/teamwiney/auth/signup/SignUpViewModel.kt index 15cb1436..1b5d9cd9 100644 --- a/feature/auth/src/main/java/com/teamwiney/auth/signup/SignUpViewModel.kt +++ b/feature/auth/src/main/java/com/teamwiney/auth/signup/SignUpViewModel.kt @@ -70,16 +70,7 @@ class SignUpViewModel @Inject constructor( when (it) { is ApiResult.Success -> { registerFcmToken() // 회원가입 완료 후 FCM 토큰 등록 - - val selectedChocolate = currentState.favoriteTastes[0].signUpFavoriteItem.find { it.isSelected }?.keyword - val tasteResultUrl = when (selectedChocolate) { - "MILK" -> "${AuthDestinations.SignUp.TASTE_RESULT}?taste=white" - else -> "${AuthDestinations.SignUp.TASTE_RESULT}?taste=red" - } - - postEffect(SignUpContract.Effect.NavigateTo(tasteResultUrl)) - - // postEffect(SignUpContract.Effect.NavigateTo(AuthDestinations.SignUp.COMPLETE)) + postEffect(SignUpContract.Effect.NavigateTo(AuthDestinations.SignUp.COMPLETE)) } is ApiResult.ApiError -> {