From 17b2f18957cafc5324b0557e15213081c374478d Mon Sep 17 00:00:00 2001 From: Mohammed Al-yaseen Date: Wed, 12 Nov 2025 23:34:21 +0300 Subject: [PATCH] use restaurant currency --- src/components/ArabicPrice/ArabicPrice.tsx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/components/ArabicPrice/ArabicPrice.tsx b/src/components/ArabicPrice/ArabicPrice.tsx index 168e591..3d549e9 100644 --- a/src/components/ArabicPrice/ArabicPrice.tsx +++ b/src/components/ArabicPrice/ArabicPrice.tsx @@ -1,5 +1,4 @@ import React from "react"; -import { useTranslation } from "react-i18next"; import { useAppSelector } from "redux/hooks"; import ProText from "../ProText"; @@ -20,8 +19,9 @@ const ArabicPrice: React.FC = ({ className, hideCurrency = false, }) => { - const { t } = useTranslation(); const { isRTL } = useAppSelector((state) => state.locale); + const {restaurant} = useAppSelector(state => state.order) + // Format the price to ensure it has 2 decimal places const formattedPrice = typeof price === "number" ? price.toFixed(2) : price; @@ -64,7 +64,7 @@ const ArabicPrice: React.FC = ({ ...(decorationStyle ?? {}), }} > - {t("common.omanCurrency")} + {isRTL ? restaurant.local_currency : restaurant.global_currency} ) : !hideCurrency ? ( @@ -88,8 +88,8 @@ const ArabicPrice: React.FC = ({ ...(decorationStyle ?? {}), }} > - {t("common.omanCurrency")} - + {isRTL ? restaurant.local_currency : restaurant.global_currency} + ) : ( {formattedPrice}