Skip to content

Commit

Permalink
Merge pull request #100 from wisemuji/feature/#89
Browse files Browse the repository at this point in the history
  • Loading branch information
wisemuji authored Jul 26, 2023
2 parents 146cb32 + 6de0deb commit eba8227
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -52,12 +52,14 @@ internal fun MainScreen(navigator: MainNavigator = rememberMainNavigator()) {
navController = navigator.navController,
startDestination = navigator.startDestination,
) {
settingNavGraph()
homeNavGraph(
padding = padding,
onSessionClick = { navigator.navigateSession() },
onContributorClick = { navigator.navigateContributor() },
)
settingNavGraph(
padding = padding,
)
// TODO: 각 모듈로 이동
val content: @Composable (String) -> Unit = {
Box(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import androidx.compose.foundation.Image
import androidx.compose.foundation.background
import androidx.compose.foundation.layout.Arrangement
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.PaddingValues
import androidx.compose.foundation.layout.Row
import androidx.compose.foundation.layout.Spacer
import androidx.compose.foundation.layout.aspectRatio
Expand Down Expand Up @@ -34,10 +35,11 @@ import com.droidknights.app2023.core.designsystem.theme.KnightsTheme
import com.droidknights.app2023.core.designsystem.theme.LocalDarkTheme

@Composable
internal fun SettingScreen() {
internal fun SettingScreen(padding: PaddingValues) {
Column(
Modifier
.background(color = Color(0xFFF9F9F9))
.padding(padding)
.padding(8.dp),
verticalArrangement = Arrangement.spacedBy(8.dp),
) {
Expand Down Expand Up @@ -138,6 +140,6 @@ private fun ThemeCard(
@Composable
private fun SettingScreenPreview() {
KnightsTheme {
SettingScreen()
SettingScreen(PaddingValues(0.dp))
}
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package com.droidknights.app2023.feature.setting.navigation

import androidx.compose.foundation.layout.PaddingValues
import androidx.navigation.NavController
import androidx.navigation.NavGraphBuilder
import androidx.navigation.NavOptions
Expand All @@ -10,9 +11,11 @@ fun NavController.navigateSetting(navOptions: NavOptions) {
navigate(SettingRoute.route, navOptions)
}

fun NavGraphBuilder.settingNavGraph() {
fun NavGraphBuilder.settingNavGraph(
padding: PaddingValues,
) {
composable(route = SettingRoute.route) {
SettingScreen()
SettingScreen(padding)
}
}

Expand Down

0 comments on commit eba8227

Please sign in to comment.