-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMainNavHost.kt
More file actions
41 lines (36 loc) · 1.19 KB
/
MainNavHost.kt
File metadata and controls
41 lines (36 loc) · 1.19 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
package com.threegap.bitnagil
import androidx.compose.runtime.Composable
import androidx.compose.ui.Modifier
import androidx.navigation.compose.NavHost
import androidx.navigation.compose.composable
import com.threegap.bitnagil.presentation.home.HomeScreen
import com.threegap.bitnagil.presentation.intro.IntroScreenContainer
import com.threegap.bitnagil.presentation.login.LoginScreenContainer
import com.threegap.bitnagil.presentation.splash.SplashScreenContainer
@Composable
fun MainNavHost(
navigator: MainNavigator,
modifier: Modifier = Modifier,
) {
NavHost(
navController = navigator.navController,
startDestination = navigator.startDestination,
modifier = modifier,
) {
composable<Route.Splash> {
SplashScreenContainer(
navigateToIntro = { navigator.navController.navigate(Route.Intro) },
navigateToHome = { navigator.navController.navigate(Route.Home) },
)
}
composable<Route.Intro> {
IntroScreenContainer()
}
composable<Route.Login> {
LoginScreenContainer()
}
composable<Route.Home> {
HomeScreen()
}
}
}