Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feat/#69] 코드 정리 #70

Merged
merged 3 commits into from
Dec 3, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -34,23 +34,18 @@ public struct AllNewsNavigationStackStore: Reducer {
public struct Path: Reducer {
public enum State: Equatable {
case quizMain(QuizMainStore.State)
case quizResult(QuizResultStore.State)
case allNews(AllNewsStore.State)
}

public enum Action: Equatable {
case quizMain(QuizMainStore.Action)
case quizResult(QuizResultStore.Action)
case allNews(AllNewsStore.Action)
}

public var body: some Reducer<State, Action> {
Scope(state: /State.quizMain, action: /Action.quizMain) {
QuizMainStore()
}
Scope(state: /State.quizResult, action: /Action.quizResult) {
QuizResultStore()
}
Scope(state: /State.allNews, action: /Action.allNews) {
AllNewsStore()
}
Expand All @@ -72,19 +67,6 @@ public struct AllNewsNavigationStackStore: Reducer {
return .none
}

case let .path(.element(id: _, action: .quizMain(.delegate(action)))):
switch action {
case let .solved(quizEntityList):
state.path.append(.quizResult(.init(quizEntityList: quizEntityList)))
return .none
}

case let .path(.element(id: _, action: .quizResult(.delegate(action)))):
switch action {
case .backToRoot:
return .send(.popToRoot)
}

case let .path(.element(id: _, action: .allNews(.delegate(action)))):
switch action {
case let .select(newsEntity):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,6 @@ public struct AllNewsNavigationStackView: View {
then: QuizMainView.init(store:)
)

case .quizResult:
CaseLet(
/AllNewsNavigationStackStore.Path.State.quizResult,
action: AllNewsNavigationStackStore.Path.Action.quizResult,
then: QuizResultView.init(store:)
)

case .allNews:
CaseLet(
/AllNewsNavigationStackStore.Path.State.allNews,
Expand Down
88 changes: 0 additions & 88 deletions Targets/D3N/Sources/Feature/News/List/NewsListStore.swift

This file was deleted.

45 changes: 0 additions & 45 deletions Targets/D3N/Sources/Feature/News/List/NewsListView.swift

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Loading