From 42a70affe22a99b86bfff4045c65640d26bc1c02 Mon Sep 17 00:00:00 2001 From: Mohammed Al-yaseen Date: Tue, 11 Nov 2025 15:47:07 +0300 Subject: [PATCH] Cart: show variant label --- .../ProCheckboxGroups/ProCheckboxGroups.tsx | 43 +++++++++---------- .../components/CartMobileTabletLayout.tsx | 12 +++++- .../product/components/ProductFooter.tsx | 2 +- src/utils/types/appTypes.ts | 2 +- 4 files changed, 33 insertions(+), 26 deletions(-) diff --git a/src/components/ProCheckboxGroups/ProCheckboxGroups.tsx b/src/components/ProCheckboxGroups/ProCheckboxGroups.tsx index 999663e..83563ae 100644 --- a/src/components/ProCheckboxGroups/ProCheckboxGroups.tsx +++ b/src/components/ProCheckboxGroups/ProCheckboxGroups.tsx @@ -17,33 +17,30 @@ const ProCheckboxGroups = ({ options, ...props }: ProCheckboxGroupsProps) => { > {options.map((option: any) => ( - <> - +
-
- - {option.label} - - {option.price} -
- - {/* {index !== options.length - 1 && } */} - + {option.label} + + {option.price} +
+
))}
diff --git a/src/pages/cart/components/CartMobileTabletLayout.tsx b/src/pages/cart/components/CartMobileTabletLayout.tsx index c7b814a..aa2f952 100644 --- a/src/pages/cart/components/CartMobileTabletLayout.tsx +++ b/src/pages/cart/components/CartMobileTabletLayout.tsx @@ -42,6 +42,7 @@ export default function CartMobileTabletLayout({ }: CartMobileTabletLayoutProps) { const { t } = useTranslation(); const { items, collectionMethod, orderType } = useAppSelector(selectCart); + const { isRTL } = useAppSelector((state) => state.locale); const { subdomain } = useParams(); const { isMobile, isTablet } = useBreakPoint(); @@ -146,7 +147,16 @@ export default function CartMobileTabletLayout({ fontWeight: 600, }} > - {item.name} + {item.name}{" "} + + {isRTL + ? item.variant?.optionsAR[0].value + : item.variant?.options[0].value} +