Skip to content

Commit

Permalink
feat : NavHost에 postDetail 화면 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
chws0508 committed Mar 24, 2024
1 parent a30fb95 commit cbcf4a3
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
1 change: 1 addition & 0 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ dependencies {
implementation(project(":feature:mypage"))
implementation(project(":feature:registerpost"))
implementation(project(":feature:gallery"))
implementation(project(":feature:postdetail"))
implementation(project(":core:interceptor"))
implementation(project(":core:data"))
implementation(project(":core:network"))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import com.withpeace.withpeace.feature.home.navigation.homeNavGraph
import com.withpeace.withpeace.feature.login.navigation.LOGIN_ROUTE
import com.withpeace.withpeace.feature.login.navigation.loginNavGraph
import com.withpeace.withpeace.feature.mypage.navigation.myPageNavGraph
import com.withpeace.withpeace.feature.postdetail.navigation.postDetailGraph
import com.withpeace.withpeace.feature.postlist.navigation.postListGraph
import com.withpeace.withpeace.feature.registerpost.navigation.IMAGE_LIST_ARGUMENT
import com.withpeace.withpeace.feature.registerpost.navigation.registerPostNavGraph
Expand Down Expand Up @@ -55,6 +56,10 @@ fun WithpeaceNavHost(
)
homeNavGraph(onShowSnackBar)
postListGraph(onShowSnackBar)
postDetailGraph(
onShowSnackBar = onShowSnackBar,
onClickBackButton = navController::popBackStack,
)
myPageNavGraph(onShowSnackBar)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ fun NavController.navigateToPostDetail(
navOptions: NavOptions? = null,
) = navigate(route = "$POST_DETAIL_ROUTE/$postId", navOptions)

fun NavGraphBuilder.postDetailNavGraph(
fun NavGraphBuilder.postDetailGraph(
onShowSnackBar: (String) -> Unit,
onClickBackButton: () -> Unit,
) {
Expand Down

0 comments on commit cbcf4a3

Please sign in to comment.