diff --git a/MidrandBookshop/Components/Layout/MainLayout.razor b/MidrandBookshop/Components/Layout/MainLayout.razor index 3090d41..747a64e 100644 --- a/MidrandBookshop/Components/Layout/MainLayout.razor +++ b/MidrandBookshop/Components/Layout/MainLayout.razor @@ -6,7 +6,7 @@
- YOUR CART (@CartItems.Sum(i => i.Quantity)) + YOUR CART (@ShoppingCart.Items.Count())
- @if (!CartItems.Any()) + @if (!ShoppingCart.Items.Any()) {
@@ -29,22 +29,29 @@ else {
- @foreach (var item in CartItems) + @foreach (var item in ShoppingCart.Items) {
- [ COVER ] + @if (!string.IsNullOrWhiteSpace(item.Product!.ImageUrl)) + { + @item.Product.Name + } + else + { + @:[COVER] + }
-
@item.Title
-

by @item.Author

+
@item.Product!.Name
+

by @($"{item.Author!.Name} {item.Author.LastName}")

- @item.Quantity + @ShoppingCart.Items.FirstOrDefault(i => i.Price!.Id == item.Price!.Id)!.Quantity
- R @(item.Price * item.Quantity) + R @(item.Price!.Amount * item.Quantity)
- @if (CartItems.Any()) + @if (ShoppingCart.Items.Any()) {