-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMainNavHost.kt
More file actions
30 lines (27 loc) · 811 Bytes
/
MainNavHost.kt
File metadata and controls
30 lines (27 loc) · 811 Bytes
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
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.login.LoginScreen
@Composable
fun MainNavHost(
navigator: MainNavigator,
modifier: Modifier = Modifier,
) {
NavHost(
navController = navigator.navController,
startDestination = navigator.startDestination,
modifier = modifier,
) {
composable<Route.Login> {
LoginScreen(
onLoginClick = { navigator.navController.navigate(Route.Home) },
)
}
composable<Route.Home> {
HomeScreen()
}
}
}