diff --git a/frontend/application/components/CheckoutPage.tsx b/frontend/application/components/CheckoutPage.tsx index 0ab25df5..e30132fc 100644 --- a/frontend/application/components/CheckoutPage.tsx +++ b/frontend/application/components/CheckoutPage.tsx @@ -126,6 +126,12 @@ export default function CheckoutPage() { }; const handleFinalize = async () => { + if (!items.length || getSubtotal() <= 0) { + toast.error("سبد خرید شما خالی است."); + router.push('/shop'); + return; + } + const totalAmount = getTotal() + shippingFee; const activePet = getActivePet();