1
0
mirror of https://github.com/LaCasemate/fab-manager.git synced 2024-12-01 12:24:28 +01:00

(fix) checkout button cant click

This commit is contained in:
Du Peng 2022-09-07 09:59:37 +02:00
parent 79f01d4f78
commit e0e8fc9ec2

View File

@ -34,7 +34,6 @@ const StoreCart: React.FC<StoreCartProps> = ({ onSuccess, onError, currentUser,
const { t } = useTranslation('public');
const { cart, setCart } = useCart(currentUser);
console.log('cart: ', cart);
const [paymentModal, setPaymentModal] = useState<boolean>(false);
/**
@ -222,7 +221,7 @@ const StoreCart: React.FC<StoreCartProps> = ({ onSuccess, onError, currentUser,
</div>
<p className='total'>{t('app.public.store_cart.checkout_total')} <span>{FormatLib.price(computePriceWithCoupon(cart.total, cart.coupon))}</span></p>
</div>
<FabButton className='checkout-btn' onClick={checkout} disabled={!cart.user || cart.order_items_attributes.length === 0}>
<FabButton className='checkout-btn' onClick={checkout}>
{t('app.public.store_cart.checkout')}
</FabButton>
</>}