@@ -16,13 +16,13 @@ public struct NavigationLinkStore<
16
16
@ObservedObject var viewStore : ViewStore < Bool , PresentationAction < Action > >
17
17
let toDestinationState : ( State ) -> DestinationState ?
18
18
let fromDestinationAction : ( DestinationAction ) -> Action
19
- let action : ( ) -> Void
19
+ let onTap : ( ) -> Void
20
20
let destination : ( Store < DestinationState , DestinationAction > ) -> Destination
21
21
let label : Label
22
22
23
23
public init (
24
24
_ store: Store < PresentationState < State > , PresentationAction < Action > > ,
25
- action : @escaping ( ) -> Void ,
25
+ onTap : @escaping ( ) -> Void ,
26
26
@ViewBuilder destination: @escaping ( Store < State , Action > ) -> Destination ,
27
27
@ViewBuilder label: ( ) -> Label
28
28
) where State == DestinationState , Action == DestinationAction {
@@ -31,16 +31,16 @@ public struct NavigationLinkStore<
31
31
self . viewStore = ViewStore ( filteredStore. scope ( state: { $0. wrappedValue != nil } ) )
32
32
self . toDestinationState = { $0 }
33
33
self . fromDestinationAction = { $0 }
34
- self . action = action
34
+ self . onTap = onTap
35
35
self . destination = destination
36
36
self . label = label ( )
37
37
}
38
38
39
39
public init (
40
40
_ store: Store < PresentationState < State > , PresentationAction < Action > > ,
41
41
state toDestinationState: @escaping ( State ) -> DestinationState ? ,
42
- action fromDestinationAction: @escaping ( DestinationAction ) -> Action ,
43
- action : @escaping ( ) -> Void ,
42
+ onTap fromDestinationAction: @escaping ( DestinationAction ) -> Action ,
43
+ onTap : @escaping ( ) -> Void ,
44
44
@ViewBuilder destination: @escaping ( Store < DestinationState , DestinationAction > ) -> Destination ,
45
45
@ViewBuilder label: ( ) -> Label
46
46
) {
@@ -52,15 +52,15 @@ public struct NavigationLinkStore<
52
52
)
53
53
self . toDestinationState = toDestinationState
54
54
self . fromDestinationAction = fromDestinationAction
55
- self . action = action
55
+ self . onTap = onTap
56
56
self . destination = destination
57
57
self . label = label ( )
58
58
}
59
59
60
60
public init (
61
61
_ store: Store < PresentationState < State > , PresentationAction < Action > > ,
62
62
id: State . ID ,
63
- action : @escaping ( ) -> Void ,
63
+ onTap : @escaping ( ) -> Void ,
64
64
@ViewBuilder destination: @escaping ( Store < State , Action > ) -> Destination ,
65
65
@ViewBuilder label: ( ) -> Label
66
66
) where State == DestinationState , Action == DestinationAction , State: Identifiable {
@@ -69,7 +69,7 @@ public struct NavigationLinkStore<
69
69
self . viewStore = ViewStore ( filteredStore. scope ( state: { $0. wrappedValue? . id == id } ) )
70
70
self . toDestinationState = { $0 }
71
71
self . fromDestinationAction = { $0 }
72
- self . action = action
72
+ self . onTap = onTap
73
73
self . destination = destination
74
74
self . label = label ( )
75
75
}
@@ -91,7 +91,7 @@ public struct NavigationLinkStore<
91
91
)
92
92
self . toDestinationState = toDestinationState
93
93
self . fromDestinationAction = fromDestinationAction
94
- self . action = action
94
+ self . onTap = action
95
95
self . destination = destination
96
96
self . label = label ( )
97
97
}
@@ -103,7 +103,7 @@ public struct NavigationLinkStore<
103
103
get: { self . viewStore. state } ,
104
104
set: {
105
105
if $0 {
106
- self . action ( )
106
+ self . onTap ( )
107
107
} else {
108
108
self . viewStore. send ( . dismiss)
109
109
}
0 commit comments