diff --git a/composeApp/src/commonMain/kotlin/net/codinux/banking/ui/App.kt b/composeApp/src/commonMain/kotlin/net/codinux/banking/ui/App.kt index 5826e26..17645f8 100644 --- a/composeApp/src/commonMain/kotlin/net/codinux/banking/ui/App.kt +++ b/composeApp/src/commonMain/kotlin/net/codinux/banking/ui/App.kt @@ -6,17 +6,15 @@ import androidx.compose.material.* import androidx.compose.material.icons.Icons import androidx.compose.material.icons.filled.Add import androidx.compose.runtime.* -import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier import androidx.compose.ui.graphics.Color import androidx.compose.ui.text.TextStyle import androidx.compose.ui.unit.dp import androidx.compose.ui.unit.sp import kotlinx.coroutines.launch +import net.codinux.banking.ui.appskeleton.AppContent import net.codinux.banking.ui.appskeleton.BottomBar import net.codinux.banking.ui.appskeleton.SideMenuContent -import net.codinux.banking.ui.composables.StateHandler -import net.codinux.banking.ui.composables.transactions.TransactionsList import net.codinux.banking.ui.config.Colors import net.codinux.banking.ui.config.DI import net.codinux.log.LoggerFactory @@ -90,11 +88,7 @@ fun App() { } } ) { scaffoldPadding -> - Column(Modifier.fillMaxSize().padding(scaffoldPadding), horizontalAlignment = Alignment.CenterHorizontally) { - TransactionsList(uiState, uiSettings) - } - - StateHandler(uiState, snackbarHostState) + AppContent(scaffoldPadding, uiState, uiSettings, snackbarHostState) } } } \ No newline at end of file diff --git a/composeApp/src/commonMain/kotlin/net/codinux/banking/ui/appskeleton/AppContent.kt b/composeApp/src/commonMain/kotlin/net/codinux/banking/ui/appskeleton/AppContent.kt new file mode 100644 index 0000000..ed946ce --- /dev/null +++ b/composeApp/src/commonMain/kotlin/net/codinux/banking/ui/appskeleton/AppContent.kt @@ -0,0 +1,26 @@ +package net.codinux.banking.ui.appskeleton + +import androidx.compose.foundation.layout.* +import androidx.compose.material.SnackbarHostState +import androidx.compose.runtime.Composable +import androidx.compose.ui.Alignment +import androidx.compose.ui.Modifier +import net.codinux.banking.ui.composables.StateHandler +import net.codinux.banking.ui.composables.transactions.TransactionsList +import net.codinux.banking.ui.settings.UiSettings +import net.codinux.banking.ui.state.UiState + +@Composable +fun AppContent( + scaffoldPadding: PaddingValues, + uiState: UiState, + uiSettings: UiSettings, + snackbarHostState: SnackbarHostState +) { + + Column(Modifier.fillMaxSize().padding(scaffoldPadding), horizontalAlignment = Alignment.CenterHorizontally) { + TransactionsList(uiState, uiSettings) + + StateHandler(uiState, snackbarHostState) + } +} \ No newline at end of file