diff --git a/Projects/App/Sources/MainTabSplit/Pokit/PokitSplitFeature.swift b/Projects/App/Sources/MainTabSplit/Pokit/PokitSplitFeature.swift index 4843e2d8..34f3a995 100644 --- a/Projects/App/Sources/MainTabSplit/Pokit/PokitSplitFeature.swift +++ b/Projects/App/Sources/MainTabSplit/Pokit/PokitSplitFeature.swift @@ -252,8 +252,11 @@ private extension PokitSplitFeature { } state.path.removeAll() return .send(.inner(.카테고리_상세_활성화(category))) - case .포킷(.delegate(.카테고리_삭제)): - state.카테고리상세 = nil + case let .포킷(.delegate(.카테고리_삭제(categoryId))): + if categoryId == state.categoryId { + state.카테고리상세 = nil + state.categoryId = nil + } return .none case let .포킷(.delegate(.수정하기(category))): return .send(.inner(.포킷추가및수정_활성화(category))) diff --git a/Projects/Feature/FeaturePokit/Sources/PokitRootFeature.swift b/Projects/Feature/FeaturePokit/Sources/PokitRootFeature.swift index 572cd53b..9760f3a8 100644 --- a/Projects/Feature/FeaturePokit/Sources/PokitRootFeature.swift +++ b/Projects/Feature/FeaturePokit/Sources/PokitRootFeature.swift @@ -130,7 +130,7 @@ public struct PokitRootFeature { case contentDetailTapped(BaseContentItem) case 미분류_카테고리_컨텐츠_조회 - case 카테고리_삭제 + case 카테고리_삭제(Int) } } @@ -340,7 +340,7 @@ private extension PokitRootFeature { case let .카테고리_삭제_API(categoryId): return .run { send in try await categoryClient.카테고리_삭제(categoryId) - await send(.delegate(.카테고리_삭제)) + await send(.delegate(.카테고리_삭제(categoryId))) } case .미분류_카테고리_페이징_조회_API: