fix price format (default oman price)

This commit is contained in:
2026-01-14 22:33:07 +03:00
parent aaef1bc11b
commit 44e2730428
4 changed files with 146 additions and 22 deletions

View File

@@ -1,6 +1,7 @@
import React from "react";
import { useAppSelector } from "redux/hooks";
import ProText from "../ProText";
import { formatPriceUi } from "utils/helpers";
interface ArabicPriceProps {
price: number | string;
@@ -25,7 +26,8 @@ const ArabicPrice: React.FC<ArabicPriceProps> = ({
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;
const formattedPrice =
typeof price === "number" ? formatPriceUi(price, 3) : price;
const { textDecoration, ...restStyle } = style;
const decorationStyle = textDecoration
? ({ textDecoration } as React.CSSProperties)