From c2a61de4008796259ab35885f6dc9ecf9c21c95e Mon Sep 17 00:00:00 2001 From: sgsk88 Date: Mon, 28 Aug 2023 22:44:35 +0900 Subject: [PATCH] =?UTF-8?q?[feature/login=5Fterm]=20=EB=84=A4=EB=B9=84?= =?UTF-8?q?=EA=B2=8C=EC=9D=B4=EC=85=98=20=EB=A1=9C=EC=A7=81=20=EC=88=98?= =?UTF-8?q?=EC=A0=95=20(#17)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../presentation/ui/login/CertificationScreen.kt | 9 +++------ .../meongmoryteam/presentation/ui/login/LoginActivity.kt | 9 +++++++-- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/presentation/src/main/java/com/meongmoryteam/presentation/ui/login/CertificationScreen.kt b/presentation/src/main/java/com/meongmoryteam/presentation/ui/login/CertificationScreen.kt index e4b581a..714f187 100644 --- a/presentation/src/main/java/com/meongmoryteam/presentation/ui/login/CertificationScreen.kt +++ b/presentation/src/main/java/com/meongmoryteam/presentation/ui/login/CertificationScreen.kt @@ -42,7 +42,6 @@ import kotlinx.coroutines.flow.collectLatest @Composable fun CertificationScreen( - navController: NavController, loginViewModel: LoginViewModel = hiltViewModel(), navigateToTermScreen: () -> Unit, ) { @@ -82,10 +81,10 @@ fun CertificationScreen( } LaunchedEffect(key1 = loginViewModel.effect) { - loginViewModel.effect.collectLatest { effect -> + loginViewModel.effect.collect { effect -> when (effect) { is LoginContract.LoginEffect.MoveToTerm -> { - navController.navigate(LoginNaviRoute.TermScreen.route) + navigateToTermScreen() } is LoginContract.LoginEffect.FailCertification -> { /* @@ -218,9 +217,7 @@ fun LoginPhoneTextField( @Preview @Composable fun LoginScreenPreview() { - CertificationScreen( - navController = rememberNavController(), - ) { + CertificationScreen() { } } \ No newline at end of file diff --git a/presentation/src/main/java/com/meongmoryteam/presentation/ui/login/LoginActivity.kt b/presentation/src/main/java/com/meongmoryteam/presentation/ui/login/LoginActivity.kt index 3b0c91a..087ef6c 100644 --- a/presentation/src/main/java/com/meongmoryteam/presentation/ui/login/LoginActivity.kt +++ b/presentation/src/main/java/com/meongmoryteam/presentation/ui/login/LoginActivity.kt @@ -5,13 +5,17 @@ import android.content.Intent import android.os.Bundle import androidx.activity.ComponentActivity import androidx.activity.compose.setContent +import androidx.compose.foundation.layout.fillMaxSize +import androidx.compose.material3.Surface import androidx.compose.runtime.Composable import androidx.compose.ui.Modifier import androidx.navigation.NavHostController import androidx.navigation.compose.NavHost import androidx.navigation.compose.composable import androidx.navigation.compose.rememberNavController +import com.meongmoryteam.presentation.ui.register_family.RegisterFamilyNavigation import com.meongmoryteam.presentation.ui.theme.MeongmoryTheme +import com.meongmoryteam.presentation.ui.theme.White import dagger.hilt.android.AndroidEntryPoint sealed class LoginNaviRoute(val route: String) { @@ -30,7 +34,9 @@ class LoginActivity : ComponentActivity() { private fun setUnivSelectScreen() { setContent { MeongmoryTheme { - LoginNavigation() + Surface(color = White, modifier = Modifier.fillMaxSize()) { + LoginNavigation() + } } } } @@ -55,7 +61,6 @@ fun LoginNavigation( ) { composable(route = LoginNaviRoute.CertificationScreen.route) { CertificationScreen( - navController = navController, navigateToTermScreen = { navController.navigate(LoginNaviRoute.TermScreen.route) } ) }