Skip to content

Commit

Permalink
[CHORE] #95 : 불필요한 Column 소거
Browse files Browse the repository at this point in the history
  • Loading branch information
jeongjaino committed Jan 30, 2024
1 parent 8195c1c commit 1425940
Showing 1 changed file with 31 additions and 30 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 1425940

Please sign in to comment.