Skip to content

Commit

Permalink
[Chore/#6] 불필요 NavGraph composable 삭제
Browse files Browse the repository at this point in the history
  • Loading branch information
SYAAINN committed Sep 18, 2024
1 parent 030d559 commit df5df9f
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 24 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,8 @@ import com.sopt.now.compose.presentation.ui.auth.screen.SignUpRoute
import com.sopt.now.compose.presentation.ui.home.navigation.HomeNavigator
import com.sopt.now.compose.presentation.ui.home.screen.HomeRoute

fun NavGraphBuilder.authNavGraph(
authNavigator: AuthNavigator,
homeNavigator: HomeNavigator
) {
fun NavGraphBuilder.authNavGraph(authNavigator: AuthNavigator) {

composable(
route = "signIn/{id}/{password}/{nickname}/{phoneNumber}",
arguments = listOf(
Expand All @@ -32,20 +30,4 @@ fun NavGraphBuilder.authNavGraph(
composable(route = "signUp") {
SignUpRoute(authNavigator)
}

composable(
route = "home/{id}/{password}/{nickname}/{phoneNumber}",
arguments = listOf(
navArgument("id") { type = NavType.StringType },
navArgument("password") { type = NavType.StringType },
navArgument("nickname") { type = NavType.StringType },
navArgument("phoneNumber") { type = NavType.StringType }
)
) { backStackEntry ->
val id = backStackEntry.arguments?.getString("id") ?: ""
val password = backStackEntry.arguments?.getString("password") ?: ""
val nickname = backStackEntry.arguments?.getString("nickname") ?: ""
val phoneNumber = backStackEntry.arguments?.getString("phoneNumber") ?: ""
HomeRoute(homeNavigator, id, password, nickname, phoneNumber)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,8 @@ import androidx.navigation.compose.composable
import androidx.navigation.navArgument
import com.sopt.now.compose.presentation.ui.home.screen.HomeRoute

fun NavGraphBuilder.homeNavGraph(
homeNavigator: HomeNavigator
) {
fun NavGraphBuilder.homeNavGraph(homeNavigator: HomeNavigator) {

composable(
route = "home/{id}/{password}/{nickname}/{phoneNumber}",
arguments = listOf(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ fun MainNavHost(
navController = navHostController,
startDestination = "signIn/{id}/{password}/{nickname}/{phoneNumber}"
) {
authNavGraph(authNavigator, homeNavigator)
authNavGraph(authNavigator)
homeNavGraph(homeNavigator)
}
}
Expand Down

0 comments on commit df5df9f

Please sign in to comment.