@@ -12,43 +12,40 @@ struct AddProductVariationToOrder: View {
1212 @ObservedObject var viewModel : AddProductVariationToOrderViewModel
1313
1414 var body : some View {
15- NavigationView {
16- Group {
17- switch viewModel. syncStatus {
18- case . results:
19- InfiniteScrollList ( isLoading: viewModel. shouldShowScrollIndicator,
20- loadAction: viewModel. syncNextPage) {
21- ForEach ( viewModel. productVariationRows) { rowViewModel in
22- ProductRow ( viewModel: rowViewModel)
23- . onTapGesture {
24- viewModel. selectVariation ( rowViewModel. productOrVariationID)
25- isPresented. toggle ( )
26- }
27- }
28- }
29- case . empty:
30- EmptyState ( title: Localization . emptyStateMessage, image: . emptyProductsTabImage)
31- . frame ( maxHeight: . infinity)
32- case . firstPageSync:
33- List ( viewModel. ghostRows) { rowViewModel in
15+ Group {
16+ switch viewModel. syncStatus {
17+ case . results:
18+ InfiniteScrollList ( isLoading: viewModel. shouldShowScrollIndicator,
19+ loadAction: viewModel. syncNextPage) {
20+ ForEach ( viewModel. productVariationRows) { rowViewModel in
3421 ProductRow ( viewModel: rowViewModel)
35- . redacted ( reason: . placeholder)
36- . shimmering ( )
22+ . onTapGesture {
23+ viewModel. selectVariation ( rowViewModel. productOrVariationID)
24+ isPresented. toggle ( )
25+ }
3726 }
38- . listStyle ( PlainListStyle ( ) )
39- default :
40- EmptyView ( )
4127 }
28+ case . empty:
29+ EmptyState ( title: Localization . emptyStateMessage, image: . emptyProductsTabImage)
30+ . frame ( maxHeight: . infinity)
31+ case . firstPageSync:
32+ List ( viewModel. ghostRows) { rowViewModel in
33+ ProductRow ( viewModel: rowViewModel)
34+ . redacted ( reason: . placeholder)
35+ . shimmering ( )
36+ }
37+ . listStyle ( PlainListStyle ( ) )
38+ default :
39+ EmptyView ( )
4240 }
43- . background ( Color ( . listBackground) . ignoresSafeArea ( ) )
44- . ignoresSafeArea ( . container, edges: . horizontal)
45- . navigationTitle ( viewModel. productName)
46- . navigationBarTitleDisplayMode ( . inline)
47- . onAppear {
48- viewModel. syncFirstPage ( )
49- }
5041 }
51- . wooNavigationBarStyle ( )
42+ . background ( Color ( . listBackground) . ignoresSafeArea ( ) )
43+ . ignoresSafeArea ( . container, edges: . horizontal)
44+ . navigationTitle ( viewModel. productName)
45+ . navigationBarTitleDisplayMode ( . inline)
46+ . onAppear {
47+ viewModel. syncFirstPage ( )
48+ }
5249 }
5350}
5451
0 commit comments