Skip to content

Commit

Permalink
[FEATURE] #105 : 기존에 사용하던 로직에서 NavigateToEventEdit Date 파라미터 소거
Browse files Browse the repository at this point in the history
  • Loading branch information
tgyuuAn committed Jan 17, 2024
1 parent bb3da67 commit 4a4e193
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ import com.wap.wapp.core.model.event.Event
@Composable
internal fun ManagementEventCard(
eventsState: ManagementViewModel.EventsState,
onCardClicked: (String, String) -> Unit,
onCardClicked: (String) -> Unit,
onAddEventButtonClicked: () -> Unit,
) {
Card(
Expand Down Expand Up @@ -65,11 +65,11 @@ internal fun ManagementEventCard(
@Composable
private fun ManagementEventContent(
eventsState: ManagementViewModel.EventsState,
onCardClicked: (String, String) -> Unit,
onCardClicked: (String) -> Unit,
onAddEventButtonClicked: () -> Unit,
) {
when (eventsState) {
is ManagementViewModel.EventsState.Init -> { }
is ManagementViewModel.EventsState.Init -> {}
is ManagementViewModel.EventsState.Loading -> CircleLoader(
modifier = Modifier
.fillMaxWidth()
Expand Down Expand Up @@ -107,13 +107,13 @@ private fun ManagementEventContent(
private fun ManagementEventItem(
item: Event,
cardColor: Color,
onCardClicked: (String, String) -> Unit,
onCardClicked: (String) -> Unit,
) {
Card(
shape = RoundedCornerShape(10.dp),
modifier = Modifier
.fillMaxSize()
.clickable { onCardClicked(item.startDateTime.toString(), item.eventId) },
.clickable { onCardClicked(item.eventId) },
colors = CardDefaults.cardColors(containerColor = cardColor),
) {
Row(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import kotlinx.coroutines.flow.collectLatest

@Composable
internal fun ManagementRoute(
navigateToEventEdit: (String, String) -> Unit,
navigateToEventEdit: (String) -> Unit,
navigateToEventRegistration: () -> Unit,
navigateToSurveyRegistration: () -> Unit,
navigateToSurveyFormEdit: (String) -> Unit,
Expand Down Expand Up @@ -88,7 +88,7 @@ internal fun ManagementScreen(
snackBarHostState: SnackbarHostState,
surveyFormsState: ManagementViewModel.SurveyFormsState,
eventsState: ManagementViewModel.EventsState,
navigateToEventEdit: (String, String) -> Unit,
navigateToEventEdit: (String) -> Unit,
navigateToEventRegistration: () -> Unit,
navigateToSurveyRegistration: () -> Unit,
navigateToSurveyFormEdit: (String) -> Unit,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ fun NavController.navigateToManagement(navOptions: NavOptions? = navOptions {})
}

fun NavGraphBuilder.managementScreen(
navigateToEventEdit: (String, String) -> Unit,
navigateToEventEdit: (String) -> Unit,
navigateToEventRegistration: () -> Unit,
navigateToSurveyRegistration: () -> Unit,
navigateToSurveyFormEdit: (String) -> Unit,
Expand Down

0 comments on commit 4a4e193

Please sign in to comment.