fix button
This commit is contained in:
@@ -67,34 +67,33 @@ const CartSummary = ({ description = '', onDescriptionChange }: CartSummaryProps
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div className='flex flex-col gap-4'>
|
||||
<div className='flex flex-col gap-4 pb-24'>
|
||||
<div>
|
||||
<div className='text-sm font-semibold'>
|
||||
{`جمع خرید: ${formatPrice(totalPrice)} تومان`}
|
||||
</div>
|
||||
</div>
|
||||
<Link
|
||||
href={'order/checkout/0'}
|
||||
onClick={(event) => {
|
||||
if (isCartEmpty) {
|
||||
event.preventDefault();
|
||||
return;
|
||||
}
|
||||
if (!isSuccess) {
|
||||
event.preventDefault();
|
||||
const redirectUrl = encodeURIComponent(pathname);
|
||||
router.push(`/${name}/auth?redirect=${redirectUrl}`);
|
||||
return;
|
||||
}
|
||||
}}
|
||||
className={isCartEmpty ? 'pointer-events-none opacity-60' : ''}
|
||||
>
|
||||
<div className='flex justify-end'>
|
||||
<Button className='!w-fit px-4' disabled={isCartEmpty}>{t('ButtonCheckout')}</Button>
|
||||
</div>
|
||||
</Link>
|
||||
</div>
|
||||
|
||||
<Link
|
||||
href={'order/checkout/0'}
|
||||
onClick={(event) => {
|
||||
if (isCartEmpty) {
|
||||
event.preventDefault();
|
||||
return;
|
||||
}
|
||||
if (!isSuccess) {
|
||||
event.preventDefault();
|
||||
const redirectUrl = encodeURIComponent(pathname);
|
||||
router.push(`/${name}/auth?redirect=${redirectUrl}`);
|
||||
return;
|
||||
}
|
||||
}}
|
||||
className={`fixed bottom-0 left-0 right-0 z-50 bg-white border-t border-border p-4 w-full ${isCartEmpty ? 'pointer-events-none opacity-60' : ''}`}
|
||||
>
|
||||
<Button className='!w-full px-4' disabled={isCartEmpty}>{t('ButtonCheckout')}</Button>
|
||||
</Link>
|
||||
|
||||
{/* {!isCartEmpty && (
|
||||
<div className='flex items-center justify-between rounded-xl border border-border px-4 py-3 text-xs text-muted-foreground'>
|
||||
<span>{t('CartControlsHint', { defaultValue: 'برای ویرایش تعداد، از دکمههای هر آیتم استفاده کنید.' })}</span>
|
||||
|
||||
Reference in New Issue
Block a user