Skip to content

Commit

Permalink
sight changes in cart screen placeholder
Browse files Browse the repository at this point in the history
  • Loading branch information
magda-woj committed Jul 31, 2024
1 parent c873bd9 commit cdf64fb
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,8 @@ class AstronomyShopNavController(
navController.navigate("${MainDestinations.PRODUCT_DETAIL_ROUTE}/$productId")
}

}

@Composable
fun BottomNavigationBar(
items: List<BottomNavItem>,
Expand All @@ -75,5 +77,4 @@ fun BottomNavigationBar(
)
}
}
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import io.opentelemetry.android.demo.model.Product

@Composable
fun CartScreen() {
// val products
val products : List<Product> = listOf()
Scaffold(
content = { innerPadding ->
Column(
Expand All @@ -27,10 +27,9 @@ fun CartScreen() {
LazyColumn(
modifier = Modifier.weight(1f)
) {
// this.items(products) { product -> CartItem(product) }
items(products.size) { index -> CartItem(products[index]) }
}
// CheckoutButton(totalPrice = products.sumOf { it.price })
CheckoutButton(totalPrice = 100.0)
CheckoutButton(totalPrice = products.sumOf { it.priceValue() })
}
}
)
Expand Down

0 comments on commit cdf64fb

Please sign in to comment.