This commit is contained in:
@@ -5,6 +5,8 @@ namespace MidrandBookshop.Components.Pages;
|
||||
|
||||
public partial class CartReview(CartService cartService)
|
||||
{
|
||||
[Inject] public IToastService ToastService { get; set; } = default!;
|
||||
|
||||
protected Cart ShoppingCart => cartService?.ShoppingCart!;
|
||||
|
||||
protected async void IncreaseQty(CartItem item)
|
||||
@@ -32,5 +34,7 @@ public partial class CartReview(CartService cartService)
|
||||
cartService.RemoveOneItem(item.Price!.Id);
|
||||
|
||||
await cartService.SaveCartToStorageAsync();
|
||||
|
||||
ToastService.ShowSuccess($"Removed {item.Product!.Name} from cart", "Cart Changed");
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user