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

File "formatted-number.tsx"

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

import {Fragment, memo} from 'react';
import {useNumberFormatter} from './use-number-formatter';
import {NumberFormatOptions} from '@internationalized/number';
import {shallowEqual} from '../utils/shallow-equal';

interface FormattedNumberProps extends NumberFormatOptions {
  value: number;
}
export const FormattedNumber = memo(
  ({value, ...options}: FormattedNumberProps) => {
    const formatter = useNumberFormatter(options);

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

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