Newer
Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
import ComposableArchitecture
import Foundation
import XCTestDynamicOverlay
public struct ContactLookupState: Equatable {
public init(
id: Data,
isLookingUp: Bool = false
) {
self.id = id
self.isLookingUp = isLookingUp
}
public var id: Data
public var isLookingUp: Bool
}
public enum ContactLookupAction: Equatable {
case task
case cancelTask
case lookupTapped
}
public struct ContactLookupEnvironment {
public init() {}
}
#if DEBUG
extension ContactLookupEnvironment {
public static let unimplemented = ContactLookupEnvironment()
}
#endif
public let contactLookupReducer = Reducer<ContactLookupState, ContactLookupAction, ContactLookupEnvironment>
{ state, action, env in
switch action {
case .task:
return .none
case .cancelTask:
return .none
case .lookupTapped:
return .none
}
}