File tree Expand file tree Collapse file tree
app/src/main/java/com/threegap/bitnagil Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -5,7 +5,9 @@ import androidx.compose.ui.Modifier
55import androidx.navigation.compose.NavHost
66import androidx.navigation.compose.composable
77import com.threegap.bitnagil.presentation.home.HomeScreen
8+ import com.threegap.bitnagil.presentation.intro.IntroScreenContainer
89import com.threegap.bitnagil.presentation.login.LoginScreenContainer
10+ import com.threegap.bitnagil.presentation.splash.SplashScreenContainer
911
1012@Composable
1113fun MainNavHost (
@@ -17,6 +19,17 @@ fun MainNavHost(
1719 startDestination = navigator.startDestination,
1820 modifier = modifier,
1921 ) {
22+ composable<Route .Splash > {
23+ SplashScreenContainer (
24+ navigateToIntro = { navigator.navController.navigate(Route .Intro ) },
25+ navigateToHome = { navigator.navController.navigate(Route .Home ) },
26+ )
27+ }
28+
29+ composable<Route .Intro > {
30+ IntroScreenContainer ()
31+ }
32+
2033 composable<Route .Login > {
2134 LoginScreenContainer ()
2235 }
Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ import androidx.navigation.compose.rememberNavController
88class MainNavigator (
99 val navController : NavHostController ,
1010) {
11- val startDestination = Route .Login
11+ val startDestination = Route .Splash
1212}
1313
1414@Composable
Original file line number Diff line number Diff line change @@ -4,6 +4,12 @@ import kotlinx.serialization.Serializable
44
55@Serializable
66sealed interface Route {
7+ @Serializable
8+ data object Splash : Route
9+
10+ @Serializable
11+ data object Intro : Route
12+
713 @Serializable
814 data object Login : Route
915
You can’t perform that action at this time.
0 commit comments