fix(checkout): guard against empty cart order submission and disable checkout CTA [FE-008]
This commit is contained in:
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();
|
||||
|
||||
|
||||
Reference in new issue
Block a user