File tree Expand file tree Collapse file tree 2 files changed +10
-3
lines changed
Projects/Feature/FeaturePokit/Sources Expand file tree Collapse file tree 2 files changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ import Util
1111@Reducer
1212public struct PokitLinkEditFeature {
1313 /// - Dependency
14-
14+ @ Dependency ( \ . dismiss ) var dismiss
1515 /// - State
1616 @ObservableState
1717 public struct State : Equatable {
@@ -36,7 +36,11 @@ public struct PokitLinkEditFeature {
3636 case delegate( DelegateAction )
3737
3838 @CasePathable
39- public enum View : Equatable { case 체크박스_선택했을때( BaseContentItem ) }
39+ public enum View : Equatable {
40+ case dismiss
41+
42+ case 체크박스_선택했을때( BaseContentItem )
43+ }
4044
4145 public enum InnerAction : Equatable { case doNothing }
4246
@@ -85,6 +89,9 @@ private extension PokitLinkEditFeature {
8589 /// - View Effect
8690 func handleViewAction( _ action: Action . View , state: inout State ) -> Effect < Action > {
8791 switch action {
92+ case . dismiss:
93+ return . run { _ in await dismiss ( ) }
94+
8895 case let . 체크박스_선택했을때( item) :
8996 /// 이미 체크되어 있다면 해제
9097 if state. selectedItems. contains ( item) {
Original file line number Diff line number Diff line change @@ -60,7 +60,7 @@ private extension PokitLinkEditView {
6060 PokitHeader ( title: " 링크 분류하기 " ) {
6161 PokitHeaderItems ( placement: . leading) {
6262 PokitToolbarButton ( . icon( . x) ) {
63- // send(.뒤로가기_버튼_눌렀을때 )
63+ send ( . dismiss )
6464 }
6565 }
6666 }
You can’t perform that action at this time.
0 commit comments