JFIFxxC      C  " }!1AQa"q2#BR$3br %&'()*456789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz w!1AQaq"2B #3Rbr{ gilour

File "formatted-currency.tsx"

Full Path: /home/markqprx/iniasli.pro/resources/client/i18n/formatted-currency.tsx
File size: 508 bytes
MIME-type: text/plain
Charset: utf-8

import {Fragment, memo} from 'react';
import {useNumberFormatter} from './use-number-formatter';

interface FormattedCurrencyProps {
  value: number;
  currency: string;
}
export const FormattedCurrency = memo(
  ({value, currency}: FormattedCurrencyProps) => {
    const formatter = useNumberFormatter({
      style: 'currency',
      currency,
      currencyDisplay: 'narrowSymbol',
    });

    if (isNaN(value)) {
      value = 0;
    }

    return <Fragment>{formatter.format(value)}</Fragment>;
  }
);