From ca763ddd2c2eed12fcc44877f44e7a492c7430ef Mon Sep 17 00:00:00 2001 From: chanu Date: Fri, 19 Apr 2024 07:09:33 +0900 Subject: [PATCH] =?UTF-8?q?#11=20[feat]=20:=20Bottom=20nav=20graph=20?= =?UTF-8?q?=EA=B5=AC=ED=98=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../now/compose/feature/nav/BottomNavGraph.kt | 25 +++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 app/src/main/java/com/sopt/now/compose/feature/nav/BottomNavGraph.kt diff --git a/app/src/main/java/com/sopt/now/compose/feature/nav/BottomNavGraph.kt b/app/src/main/java/com/sopt/now/compose/feature/nav/BottomNavGraph.kt new file mode 100644 index 0000000..6b49713 --- /dev/null +++ b/app/src/main/java/com/sopt/now/compose/feature/nav/BottomNavGraph.kt @@ -0,0 +1,25 @@ +package com.sopt.now.compose.feature.nav + +import androidx.compose.runtime.Composable +import androidx.navigation.NavHostController +import androidx.navigation.compose.NavHost +import androidx.navigation.compose.composable +import com.sopt.now.compose.feature.home.HomeScreen +import com.sopt.now.compose.feature.model.User +import com.sopt.now.compose.feature.mypage.MyPageScreen +import com.sopt.now.compose.feature.search.SearchScreen + +@Composable +fun BottomNavGraph(navController: NavHostController, user: User) { + NavHost(navController = navController, startDestination = BottomNavItem.Home.screenRoute) { + composable(BottomNavItem.Home.screenRoute) { + HomeScreen() + } + composable(BottomNavItem.Search.screenRoute) { + SearchScreen() + } + composable(BottomNavItem.MyPage.screenRoute) { + MyPageScreen(user = user) + } + } +}