@@ -43,6 +43,13 @@ fun RoutineListScreenContainer(
4343 viewModel.sideEffectFlow.collectAsEffect { sideEffect ->
4444 when (sideEffect) {
4545 is RoutineListSideEffect .NavigateToBack -> navigateToBack()
46+ is RoutineListSideEffect .NavigateToWriteRoutine -> {
47+ // TODO: 네비게이션 연결하기
48+ // navigateToWriteRoutine(
49+ // routineId = sideEffect.routineId,
50+ // applyDate = sideEffect.applyDate,
51+ // )
52+ }
4653 }
4754 }
4855
@@ -59,15 +66,13 @@ fun RoutineListScreenContainer(
5966 }
6067
6168 if (uiState.editConfirmBottomSheetVisible) {
62- EditConfirmBottomSheet (
63- onDismissRequest = { viewModel.sendIntent(RoutineListIntent .HideEditConfirmBottomSheet ) },
64- onApplyToday = {
65- // TODO("루틴수정으로 이동(id와 수정여부(TODAY) 넘겨주기")
66- },
67- onApplyTomorrow = {
68- // TODO("루틴수정으로 이동(id와 수정여부(TOMORROW) 넘겨주기")
69- },
70- )
69+ uiState.selectedRoutine?.let {
70+ EditConfirmBottomSheet (
71+ onDismissRequest = { viewModel.sendIntent(RoutineListIntent .HideEditConfirmBottomSheet ) },
72+ onApplyToday = { viewModel.sendIntent(RoutineListIntent .OnApplyTodayClick ) },
73+ onApplyTomorrow = { viewModel.sendIntent(RoutineListIntent .OnApplyTomorrowClick ) },
74+ )
75+ }
7176 }
7277
7378 RoutineListScreen (
@@ -78,8 +83,10 @@ fun RoutineListScreenContainer(
7883 onShowDeleteConfirmBottomSheet = { routine ->
7984 viewModel.sendIntent(RoutineListIntent .ShowDeleteConfirmBottomSheet (routine))
8085 },
81- onShowEditConfirmBottomSheet = { viewModel.sendIntent(RoutineListIntent .ShowEditConfirmBottomSheet ) },
82- onRegisterRoutineClick = {},
86+ onShowEditConfirmBottomSheet = { routine ->
87+ viewModel.sendIntent(RoutineListIntent .ShowEditConfirmBottomSheet (routine))
88+ },
89+ onRegisterRoutineClick = { viewModel.sendIntent(RoutineListIntent .OnRegisterRoutineClick ) },
8390 onBackClick = { viewModel.sendIntent(RoutineListIntent .NavigateToBack ) },
8491 )
8592}
@@ -89,7 +96,7 @@ private fun RoutineListScreen(
8996 uiState : RoutineListState ,
9097 onDateSelect : (LocalDate ) -> Unit ,
9198 onShowDeleteConfirmBottomSheet : (RoutineUiModel ) -> Unit ,
92- onShowEditConfirmBottomSheet : () -> Unit ,
99+ onShowEditConfirmBottomSheet : (RoutineUiModel ) -> Unit ,
93100 onRegisterRoutineClick : () -> Unit ,
94101 onBackClick : () -> Unit ,
95102 modifier : Modifier = Modifier ,
@@ -137,7 +144,7 @@ private fun RoutineListScreen(
137144 ) { routine ->
138145 RoutineDetailsCard (
139146 routine = routine,
140- onEditClick = { onShowEditConfirmBottomSheet() },
147+ onEditClick = { onShowEditConfirmBottomSheet(routine ) },
141148 onDeleteClick = { onShowDeleteConfirmBottomSheet(routine) },
142149 )
143150 }
0 commit comments