diff --git a/feature/management-survey/src/main/java/com/wap/wapp/feature/management/survey/SurveyEventContent.kt b/feature/management-survey/src/main/java/com/wap/wapp/feature/management/survey/SurveyEventContent.kt index 775377f0..1a4ee7e6 100644 --- a/feature/management-survey/src/main/java/com/wap/wapp/feature/management/survey/SurveyEventContent.kt +++ b/feature/management-survey/src/main/java/com/wap/wapp/feature/management/survey/SurveyEventContent.kt @@ -29,43 +29,44 @@ internal fun SurveyEventContent( selectedEvent: Event, onEventSelected: (Event) -> Unit, onNextButtonClicked: () -> Unit, - modifier: Modifier = Modifier, ) { - WappTitle( - title = stringResource(R.string.event_selection_title), - content = stringResource(R.string.event_selection_content), - modifier = Modifier.padding(top = 10.dp, bottom = 40.dp), - ) + Column(modifier = Modifier.fillMaxSize()) { + WappTitle( + title = stringResource(R.string.event_selection_title), + content = stringResource(R.string.event_selection_content), + modifier = Modifier.padding(top = 10.dp, bottom = 40.dp), + ) - LazyColumn( - verticalArrangement = Arrangement.spacedBy(16.dp), - modifier = modifier, - ) { - when (eventsState) { - is EventsState.Loading -> item { - CircleLoader( - modifier = Modifier.fillMaxSize(), - ) - } - - is EventsState.Success -> - items(eventsState.events) { event -> - EventCard( - event = event, - selectedEvent = selectedEvent, - onEventSelected = onEventSelected, + LazyColumn( + verticalArrangement = Arrangement.spacedBy(16.dp), + modifier = Modifier.weight(1f), + ) { + when (eventsState) { + is EventsState.Loading -> item { + CircleLoader( + modifier = Modifier.fillMaxSize(), ) } - is EventsState.Failure -> {} + is EventsState.Success -> + items(eventsState.events) { event -> + EventCard( + event = event, + selectedEvent = selectedEvent, + onEventSelected = onEventSelected, + ) + } + + is EventsState.Failure -> {} + } } - } - WappButton( - textRes = R.string.next, - onClick = onNextButtonClicked, - modifier = Modifier.padding(top = 20.dp, bottom = 20.dp), - ) + WappButton( + textRes = R.string.next, + onClick = onNextButtonClicked, + modifier = Modifier.padding(top = 16.dp), + ) + } } @Composable