Skip to content

Commit

Permalink
#13 [Chore] : 수정 MainActivity viewModel 전달 제거
Browse files Browse the repository at this point in the history
  • Loading branch information
imtaejugkim committed Dec 18, 2024
1 parent 0f3f9bb commit 2260732
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions app/src/main/java/org/sopt/and/presentation/MainActivity.kt
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.foundation.layout.padding
import androidx.compose.material3.Scaffold
import androidx.compose.ui.Modifier
import androidx.lifecycle.viewmodel.compose.viewModel
import androidx.navigation.compose.NavHost
import androidx.navigation.compose.composable
import androidx.navigation.compose.rememberNavController
Expand All @@ -17,7 +16,6 @@ import org.sopt.and.presentation.login.LogInScreen
import org.sopt.and.presentation.main.MainScreen
import org.sopt.and.presentation.navigation.Screen
import org.sopt.and.presentation.signup.SignUpScreen
import org.sopt.and.presentation.signup.UserViewModel
import org.sopt.and.ui.theme.ANDANDROIDTheme

@AndroidEntryPoint
Expand All @@ -29,17 +27,16 @@ class MainActivity : ComponentActivity() {
ANDANDROIDTheme {
Scaffold(modifier = Modifier.fillMaxSize()) { innerPadding ->
val navController = rememberNavController()
val userViewModel: UserViewModel = viewModel()
NavHost(
navController = navController,
startDestination = Screen.LogIn.route,
modifier = Modifier.padding(innerPadding)
) {
composable(Screen.LogIn.route) {
LogInScreen(navController, userViewModel)
LogInScreen(navController)
}
composable(Screen.SignUp.route) {
SignUpScreen(navController, userViewModel)
SignUpScreen(navController)
}
composable(Screen.MainScreen.route) {
MainScreen(navController)
Expand Down

0 comments on commit 2260732

Please sign in to comment.