File tree Expand file tree Collapse file tree 2 files changed +16
-11
lines changed
Fruitties/iosApp/iosApp/ui Expand file tree Collapse file tree 2 files changed +16
-11
lines changed Original file line number Diff line number Diff line change @@ -47,6 +47,7 @@ struct CartView : View {
47
47
CartDetailsView ( cartViewModel: cartViewModel)
48
48
Spacer ( )
49
49
}
50
+ . navigationTitle ( " Your Cart " )
50
51
}
51
52
}
52
53
}
Original file line number Diff line number Diff line change @@ -35,17 +35,6 @@ struct ContentView: View {
35
35
)
36
36
NavigationStack {
37
37
VStack {
38
- Text ( " Fruitties " ) . font ( . largeTitle) . fontWeight ( . bold)
39
- NavigationLink {
40
- ViewModelStoreOwnerProvider {
41
- CartView ( )
42
- }
43
- } label: {
44
- Observing ( mainViewModel. homeUiState) { homeUIState in
45
- let total = homeUIState. cartItemCount
46
- Text ( " View Cart ( \( total) ) " )
47
- }
48
- }
49
38
Observing ( mainViewModel. homeUiState) { homeUIState in
50
39
ScrollView {
51
40
LazyVStack {
@@ -66,6 +55,21 @@ struct ContentView: View {
66
55
}
67
56
}
68
57
}
58
+ . navigationTitle ( " Fruitties " )
59
+ . toolbar {
60
+ ToolbarItem ( placement: . navigationBarTrailing) {
61
+ NavigationLink {
62
+ ViewModelStoreOwnerProvider {
63
+ CartView ( )
64
+ }
65
+ } label: {
66
+ Observing ( mainViewModel. homeUiState) { homeUIState in
67
+ let total = homeUIState. cartItemCount
68
+ Text ( " View Cart ( \( total) ) " )
69
+ }
70
+ }
71
+ }
72
+ }
69
73
}
70
74
}
71
75
}
You can’t perform that action at this time.
0 commit comments