Skip to content

Commit

Permalink
[feat] #156 empty 화면에서 카테고리 추가, 링크추가 액션 적용
Browse files Browse the repository at this point in the history
  • Loading branch information
stealmh committed Nov 24, 2024
1 parent 3b56c30 commit 59f960f
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 2 deletions.
6 changes: 4 additions & 2 deletions Projects/App/Sources/MainTab/MainTabPath.swift
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,8 @@ public extension MainTabFeature {

/// - 포킷 `추가` 버튼 눌렀을 때
case .delegate(.포킷추가하기),
.path(.element(_, action: .링크추가및수정(.delegate(.포킷추가하기)))):
.path(.element(_, action: .링크추가및수정(.delegate(.포킷추가하기)))),
.pokit(.delegate(.포킷추가_버튼_눌렀을때)):
state.path.append(.포킷추가및수정(PokitCategorySettingFeature.State(type: .추가)))
return .none

Expand Down Expand Up @@ -164,7 +165,8 @@ public extension MainTabFeature {
state.path.append(.링크추가및수정(ContentSettingFeature.State(contentId: id)))
return .none
/// - 링크 추가하기
case .delegate(.링크추가하기):
case .delegate(.링크추가하기),
.pokit(.delegate(.링크추가_버튼_눌렀을때)):
state.categoryId = nil
state.path.append(.링크추가및수정(ContentSettingFeature.State(urlText: state.link)))
state.link = nil
Expand Down
11 changes: 11 additions & 0 deletions Projects/Feature/FeaturePokit/Sources/PokitRootFeature.swift
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,8 @@ public struct PokitRootFeature {
case 분류_버튼_눌렀을때
case 케밥_버튼_눌렀을때(BaseCategoryItem)
case 미분류_케밥_버튼_눌렀을때(BaseContentItem)
case 포킷추가_버튼_눌렀을때
case 링크추가_버튼_눌렀을때
case 카테고리_눌렀을때(BaseCategoryItem)
case 컨텐츠_항목_눌렀을때(BaseContentItem)
case 링크_공유_완료되었을때
Expand Down Expand Up @@ -123,6 +125,9 @@ public struct PokitRootFeature {
/// 링크상세로 이동
case contentDetailTapped(BaseContentItem)
case 미분류_카테고리_컨텐츠_조회

case 포킷추가_버튼_눌렀을때
case 링크추가_버튼_눌렀을때
}
}

Expand Down Expand Up @@ -209,6 +214,12 @@ private extension PokitRootFeature {
case .미분류_케밥_버튼_눌렀을때(let selectedItem):
state.selectedUnclassifiedItem = selectedItem
return .run { send in await send(.inner(.카테고리_시트_활성화(true))) }

case .포킷추가_버튼_눌렀을때:
return .run { send in await send(.delegate(.포킷추가_버튼_눌렀을때)) }

case .링크추가_버튼_눌렀을때:
return .run { send in await send(.delegate(.링크추가_버튼_눌렀을때)) }

case .카테고리_눌렀을때(let category):
return .run { send in await send(.delegate(.categoryTapped(category))) }
Expand Down
2 changes: 2 additions & 0 deletions Projects/Feature/FeaturePokit/Sources/PokitRootView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,7 @@ private extension PokitRootView {
VStack {
PokitCaution(
type: .카테고리없음,
action: { send(.포킷추가_버튼_눌렀을때) }
)
.padding(.top, 36)

Expand Down Expand Up @@ -170,6 +171,7 @@ private extension PokitRootView {
VStack {
PokitCaution(
type: .미분류_링크없음,
action: { send(.링크추가_버튼_눌렀을때) }
)
.padding(.top, 36)

Expand Down

0 comments on commit 59f960f

Please sign in to comment.