Skip to content

Commit

Permalink
[CHORE] Create Image 모듈 Route 네이밍 변경
Browse files Browse the repository at this point in the history
CreateImage Navigation 의 route 를 create_route 로, CreateImageScreen 의 route 를 create_image_route 로 변경
  • Loading branch information
easyhooon committed Apr 5, 2024
1 parent ec5198f commit f06c5e9
Showing 1 changed file with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,15 @@ import com.nexters.ilab.feature.createimage.viewmodel.CreateImageViewModel

const val IMAGE_URL = "image_url"
const val STYLE_ID = "style_id"
const val CREATE_IMAGE_ROUTE = "create_image_route/{$IMAGE_URL}/{$STYLE_ID}"
const val CREATE_ROUTE = "create_route"
const val CREATE_ROUTE = "create_route/{$IMAGE_URL}/{$STYLE_ID}"
const val CREATE_IMAGE_ROUTE = "create_image_route"
const val CREATE_IMAGE_COMPLETE_ROUTE = "create_image_complete_route"

fun NavController.navigateToCreateImage(
imageUrl: String,
styleId: Int,
) {
navigate("create_image_route/$imageUrl/$styleId")
navigate("create_route/$imageUrl/$styleId")
}

fun NavController.navigateToCreateImageComplete() {
Expand All @@ -35,8 +35,8 @@ fun NavGraphBuilder.createImageNavGraph(
onNavigateToCreateImageComplete: () -> Unit,
) {
navigation(
startDestination = CREATE_ROUTE,
route = CREATE_IMAGE_ROUTE,
startDestination = CREATE_IMAGE_ROUTE,
route = CREATE_ROUTE,
arguments = listOf(
navArgument(IMAGE_URL) {
type = NavType.StringType
Expand All @@ -46,7 +46,7 @@ fun NavGraphBuilder.createImageNavGraph(
},
),
) {
composable(route = CREATE_ROUTE) { entry ->
composable(route = CREATE_IMAGE_ROUTE) { entry ->
val viewModel = entry.sharedViewModel<CreateImageViewModel>(navController)
CreateImageRoute(
onCloseClick = onCloseClick,
Expand Down

0 comments on commit f06c5e9

Please sign in to comment.