Skip to content

Commit

Permalink
Fix: rename property
Browse files Browse the repository at this point in the history
  • Loading branch information
MrSmart00 committed Jun 20, 2024
1 parent 0b6ef8e commit 90bc26f
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions app-ios/Sources/AboutFeature/AboutReducer.swift
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ public struct AboutReducer {
@ObservableState
public struct State: Equatable {
var path = StackState<Path.State>()
@Presents var presentation: Destination.State?
@Presents var destination: Destination.State?

public init(path: StackState<Path.State> = .init()) {
self.path = path
Expand Down Expand Up @@ -57,13 +57,13 @@ public struct AboutReducer {
state.path.append(.sponsors)
return .none
case .view(.codeOfConductTapped):
state.presentation = .codeOfConduct
state.destination = .codeOfConduct
return .none
case .view(.acknowledgementsTapped):
state.path.append(.acknowledgements)
return .none
case .view(.privacyPolicyTapped):
state.presentation = .privacyPolicy
state.destination = .privacyPolicy
return .none
case .presentation:
return .none
Expand Down
4 changes: 2 additions & 2 deletions app-ios/Sources/AboutFeature/AboutView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@ public struct AboutView: View {
Text("Acknowledgements")
}
}
.sheet(item: $store.scope(state: \.presentation?.codeOfConduct, action: \.presentation.codeOfConduct), content: { _ in
.sheet(item: $store.scope(state: \.destination?.codeOfConduct, action: \.presentation.codeOfConduct), content: { _ in
Text("CodeOfConduct")
})
.sheet(item: $store.scope(state: \.presentation?.privacyPolicy, action: \.presentation.privacyPolicy), content: { _ in
.sheet(item: $store.scope(state: \.destination?.privacyPolicy, action: \.presentation.privacyPolicy), content: { _ in
Text("PrivacyPolicy")
})
}
Expand Down
4 changes: 2 additions & 2 deletions app-ios/Tests/AboutFeatureTests/AboutFeatureTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ final class AboutFeatureTests: XCTestCase {
AboutReducer()
}
await store.send(\.view.codeOfConductTapped) {
$0.presentation = .codeOfConduct
$0.destination = .codeOfConduct
}
}

Expand All @@ -61,7 +61,7 @@ final class AboutFeatureTests: XCTestCase {
AboutReducer()
}
await store.send(\.view.privacyPolicyTapped) {
$0.presentation = .privacyPolicy
$0.destination = .privacyPolicy
}
}
}

0 comments on commit 90bc26f

Please sign in to comment.