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) } ) }