@@ -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 {
@@ -34,16 +34,16 @@ public struct NavigationLinkStore<
34
34
)
35
35
self . toDestinationState = { $0 }
36
36
self . fromDestinationAction = { $0 }
37
- self . action = action
37
+ self . onTap = onTap
38
38
self . destination = destination
39
39
self . label = label ( )
40
40
}
41
41
42
42
public init (
43
43
_ store: Store < PresentationState < State > , PresentationAction < Action > > ,
44
44
state toDestinationState: @escaping ( State ) -> DestinationState ? ,
45
- action fromDestinationAction: @escaping ( DestinationAction ) -> Action ,
46
- action : @escaping ( ) -> Void ,
45
+ onTap fromDestinationAction: @escaping ( DestinationAction ) -> Action ,
46
+ onTap : @escaping ( ) -> Void ,
47
47
@ViewBuilder destination: @escaping ( Store < DestinationState , DestinationAction > ) -> Destination ,
48
48
@ViewBuilder label: ( ) -> Label
49
49
) {
@@ -56,15 +56,15 @@ public struct NavigationLinkStore<
56
56
)
57
57
self . toDestinationState = toDestinationState
58
58
self . fromDestinationAction = fromDestinationAction
59
- self . action = action
59
+ self . onTap = onTap
60
60
self . destination = destination
61
61
self . label = label ( )
62
62
}
63
63
64
64
public init (
65
65
_ store: Store < PresentationState < State > , PresentationAction < Action > > ,
66
66
id: State . ID ,
67
- action : @escaping ( ) -> Void ,
67
+ onTap : @escaping ( ) -> Void ,
68
68
@ViewBuilder destination: @escaping ( Store < State , Action > ) -> Destination ,
69
69
@ViewBuilder label: ( ) -> Label
70
70
) where State == DestinationState , Action == DestinationAction , State: Identifiable {
@@ -76,7 +76,7 @@ public struct NavigationLinkStore<
76
76
)
77
77
self . toDestinationState = { $0 }
78
78
self . fromDestinationAction = { $0 }
79
- self . action = action
79
+ self . onTap = onTap
80
80
self . destination = destination
81
81
self . label = label ( )
82
82
}
@@ -99,7 +99,7 @@ public struct NavigationLinkStore<
99
99
)
100
100
self . toDestinationState = toDestinationState
101
101
self . fromDestinationAction = fromDestinationAction
102
- self . action = action
102
+ self . onTap = action
103
103
self . destination = destination
104
104
self . label = label ( )
105
105
}
@@ -111,7 +111,7 @@ public struct NavigationLinkStore<
111
111
get: { self . viewStore. state } ,
112
112
set: {
113
113
if $0 {
114
- self . action ( )
114
+ self . onTap ( )
115
115
} else {
116
116
self . viewStore. send ( . dismiss)
117
117
}
0 commit comments