fix price format (default oman price)
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user