fix(checkout): guard against empty cart order submission and disable checkout CTA [FE-008]

This commit is contained in:
devops committed 2026-10-18 16:16:15 +00:00
1 parent 86eb0cfcae
commit dab66a2dce
1 file changed
+6
@@ -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();