From 7bd15fce310efbcc3eeb97634661410faf0f8a34 Mon Sep 17 00:00:00 2001 From: hamid zarghami Date: Tue, 16 Dec 2025 15:00:18 +0330 Subject: [PATCH] fix button --- .../(Dialogs)/cart/components/CartSummary.tsx | 41 +++++++++---------- .../[id]/components/SummarySection.tsx | 6 ++- 2 files changed, 24 insertions(+), 23 deletions(-) diff --git a/src/app/[name]/(Dialogs)/cart/components/CartSummary.tsx b/src/app/[name]/(Dialogs)/cart/components/CartSummary.tsx index 684eb4a..dcd3342 100644 --- a/src/app/[name]/(Dialogs)/cart/components/CartSummary.tsx +++ b/src/app/[name]/(Dialogs)/cart/components/CartSummary.tsx @@ -67,34 +67,33 @@ const CartSummary = ({ description = '', onDescriptionChange }: CartSummaryProps -
+
{`جمع خرید: ${formatPrice(totalPrice)} تومان`}
- { - 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' : ''} - > -
- -
-
+ { + 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' : ''}`} + > + + + {/* {!isCartEmpty && (
{t('CartControlsHint', { defaultValue: 'برای ویرایش تعداد، از دکمه‌های هر آیتم استفاده کنید.' })} diff --git a/src/app/[name]/(Dialogs)/order/checkout/[id]/components/SummarySection.tsx b/src/app/[name]/(Dialogs)/order/checkout/[id]/components/SummarySection.tsx index fef8cb7..99f4df5 100644 --- a/src/app/[name]/(Dialogs)/order/checkout/[id]/components/SummarySection.tsx +++ b/src/app/[name]/(Dialogs)/order/checkout/[id]/components/SummarySection.tsx @@ -85,7 +85,7 @@ export const SummarySection = ({ cartModal, onToggleCartModal, deliveryType }: S return ( <>
-
+

{t("SectionSummary.Title")}

-
+
+