fix: add back navigation from EventDetailScreen to Schedule

This commit is contained in:
2026-07-08 18:02:14 +02:00
parent 28de93263b
commit b676c768fe
2 changed files with 10 additions and 1 deletions
@@ -71,6 +71,7 @@ fun App(
account = screen.account,
eventTitle = screen.eventTitle,
viewModel = eventDetailViewModel,
onBack = { currentScreen = Screen.Schedule },
)
}
}
@@ -36,6 +36,7 @@ fun EventDetailScreen(
account: String,
eventTitle: String,
viewModel: EventDetailViewModel,
onBack: () -> Unit,
modifier: Modifier = Modifier,
) {
LaunchedEffect(gameId, account) {
@@ -46,7 +47,14 @@ fun EventDetailScreen(
Scaffold(
topBar = {
TopAppBar(title = { Text(eventTitle) })
TopAppBar(
title = { Text(eventTitle) },
navigationIcon = {
androidx.compose.material3.TextButton(onClick = onBack) {
Text("Retour")
}
},
)
},
modifier = modifier,
) { padding ->