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>
|
||||
|
||||
@@ -85,7 +85,7 @@ export const SummarySection = ({ cartModal, onToggleCartModal, deliveryType }: S
|
||||
return (
|
||||
<>
|
||||
<section className="">
|
||||
<div className="py-3 pb-10">
|
||||
<div className="py-3 pb-28">
|
||||
<div className='w-full flex justify-between items-center gap-2'>
|
||||
<h3 className="text-sm2 font-medium leading-5 inline-block">{t("SectionSummary.Title")}</h3>
|
||||
<button
|
||||
@@ -116,7 +116,9 @@ export const SummarySection = ({ cartModal, onToggleCartModal, deliveryType }: S
|
||||
<span className='font-medium '>{t("SectionSummary.TotalLabel")}</span>
|
||||
<span className='font-bold place-self-end'>{formatPrice(total)} T</span>
|
||||
</div>
|
||||
<Button onClick={handleSubmit} className='mt-6'>
|
||||
</div>
|
||||
<div className='fixed bottom-0 left-0 right-0 z-50 bg-white dark:bg-background border-t border-border p-4 w-full'>
|
||||
<Button onClick={handleSubmit} className='px-10 w-full'>
|
||||
{t("ButtonSubmit")}
|
||||
</Button>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user