Skip to content

Commit

Permalink
[MOD]
Browse files Browse the repository at this point in the history
 - mod GnrNavHost
 - mod MatchDetailScreen
 - mod MatchNavigation
  • Loading branch information
KanuKim97 committed May 22, 2024
1 parent 38408d9 commit 4890e46
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ fun GnrNavHost(

matchDetailScreen(
onClickChat = { navController.navigateToChatRoom(it) },
onBackIconClick = { navController.popBackStack() },
onShowSnackbar = onShowSnackbar
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ import com.eshc.goonersapp.core.common.state.UiState
import com.eshc.goonersapp.core.common.util.DateUtil
import com.eshc.goonersapp.core.designsystem.IconPack
import com.eshc.goonersapp.core.designsystem.component.GnrTabItem
import com.eshc.goonersapp.core.designsystem.component.GnrTopBar
import com.eshc.goonersapp.core.designsystem.component.MatchLeagueInfo
import com.eshc.goonersapp.core.designsystem.iconpack.IcTalk
import com.eshc.goonersapp.core.designsystem.theme.ColorFF10358A
Expand All @@ -60,14 +61,21 @@ import com.eshc.goonersapp.feature.match.state.MatchDetailUiState

@Composable
fun MatchDetailRootScreen(
onBackIconClick: () -> Unit,
onShowSnackbar: (String) -> Unit,
onClickChat: (MatchUiModel) -> Unit,
viewModel: MatchDetailViewModel = hiltViewModel(),
) {
val matchData by viewModel.matchDetailUiState.collectAsStateWithLifecycle()

Scaffold(
topBar = { /* TODO("Not yet implemented") */ }
topBar = {
GnrTopBar(
title = "",
onBackIconClick = onBackIconClick,
content = { }
)
}
) { paddingValues ->
MatchDetailScreen(
matchDetailUiState = matchData,
Expand All @@ -88,6 +96,7 @@ fun MatchDetailScreen(
var selectedTab by remember { mutableStateOf(DetailTab.SUMMARY) }
val match = matchDetailUiState.match
val matchDetail = matchDetailUiState.matchDetailState

Box(
modifier = modifier
.fillMaxSize()
Expand Down Expand Up @@ -238,13 +247,8 @@ fun MatchDetailScreen(

item {
when (selectedTab) {
DetailTab.SUMMARY -> {
SummaryScreen()
}

DetailTab.COMMENT -> {

}
DetailTab.SUMMARY -> { SummaryScreen() }
DetailTab.COMMENT -> { /* TODO("Not yet implemented") */ }
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ fun NavGraphBuilder.matchScreen(


fun NavGraphBuilder.matchDetailScreen(
onBackIconClick: () -> Unit,
onClickChat : (MatchUiModel) -> Unit,
onShowSnackbar : (String) -> Unit
) {
Expand All @@ -54,6 +55,7 @@ fun NavGraphBuilder.matchDetailScreen(
) {
MatchDetailRootScreen(
onClickChat = onClickChat,
onBackIconClick = onBackIconClick,
onShowSnackbar = onShowSnackbar
)
}
Expand Down

0 comments on commit 4890e46

Please sign in to comment.