Skip to content

Commit bd49c11

Browse files
committed
Use totalItemCount
1 parent 6701a61 commit bd49c11

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Fruitties/iosApp/iosApp/ui/CartView.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ struct CartView : View {
4040
Observing(cartViewModel.cartUiState) { cartUIState in
4141
VStack {
4242
HStack {
43-
let total = cartUIState.cartDetails.reduce(0) { $0 + $1.count }
43+
let total = cartUIState.totalItemCount
4444
Text("Cart has \(total) items").padding()
4545
Spacer()
4646
}

0 commit comments

Comments
 (0)