move this here
This commit is contained in:
parent
12273bdd17
commit
9574ed496d
1 changed files with 27 additions and 22 deletions
|
@ -69,30 +69,35 @@ class DashboardActivity : ComponentActivity() {
|
||||||
enableEdgeToEdge()
|
enableEdgeToEdge()
|
||||||
setContent {
|
setContent {
|
||||||
VastappTheme {
|
VastappTheme {
|
||||||
val items = listOf(
|
DashboardApp(dashboardViewModel = dashboardViewModel)
|
||||||
Screen.Dashboard,
|
}
|
||||||
Screen.Instances,
|
}
|
||||||
Screen.Billing,
|
}
|
||||||
Screen.Help
|
}
|
||||||
)
|
|
||||||
|
|
||||||
val navController = rememberNavController()
|
@Composable
|
||||||
|
fun DashboardApp(dashboardViewModel: DashboardViewModel) {
|
||||||
|
val items = listOf(
|
||||||
|
Screen.Dashboard,
|
||||||
|
Screen.Instances,
|
||||||
|
Screen.Billing,
|
||||||
|
Screen.Help
|
||||||
|
)
|
||||||
|
|
||||||
Scaffold(
|
val navController = rememberNavController()
|
||||||
modifier = Modifier.fillMaxSize(),
|
|
||||||
bottomBar = {
|
Scaffold(
|
||||||
MyNavigationBar(items, navController = navController)
|
modifier = Modifier.fillMaxSize(),
|
||||||
}
|
bottomBar = {
|
||||||
) { innerPadding ->
|
MyNavigationBar(items, navController = navController)
|
||||||
Column(modifier = Modifier.padding(innerPadding)) {
|
}
|
||||||
NavHost(navController = navController, startDestination = "dashboard") {
|
) { innerPadding ->
|
||||||
composable("dashboard") { DashboardScreen(dashboardViewModel) }
|
Column(modifier = Modifier.padding(innerPadding)) {
|
||||||
composable("instances") { InstancesScreen(dashboardViewModel) }
|
NavHost(navController = navController, startDestination = "dashboard") {
|
||||||
composable("billing") { BillingScreen(dashboardViewModel) }
|
composable("dashboard") { DashboardScreen(dashboardViewModel) }
|
||||||
composable("help") { HelpScreen(dashboardViewModel) }
|
composable("instances") { InstancesScreen(dashboardViewModel) }
|
||||||
}
|
composable("billing") { BillingScreen(dashboardViewModel) }
|
||||||
}
|
composable("help") { HelpScreen(dashboardViewModel) }
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue