Skip to content
Prev Previous commit
Next Next commit
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Nov 23, 2025
commit ed48f7654a664bb6763e5e41673002d0d69b1bd3
14 changes: 11 additions & 3 deletions frontend/src/components/data-table/columns.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@
isCellSelected,
);

const maxDisplayPrecision = maxFractionalDigits(useLocale().locale);

Check failure on line 254 in frontend/src/components/data-table/columns.tsx

View workflow job for this annotation

GitHub Actions / 🧹 Lint frontend

React Hook "useLocale" is called in function "cell" that is neither a React function component nor a custom React Hook function. React component names must start with an uppercase letter. React Hook names must start with the word "use"

const renderedCell = renderCellValue({
column,
Expand Down Expand Up @@ -554,7 +554,7 @@
if (typeof value === "number") {
return (
<div onClick={selectCell} className={cellStyles}>
<LocaleNumber value={value} maxDisplayPrecision={maxDisplayPrecision}/>
<LocaleNumber value={value} maxDisplayPrecision={maxDisplayPrecision} />
</div>
);
}
Expand Down Expand Up @@ -600,7 +600,15 @@
);
}

const LocaleNumber = ({ value, maxDisplayPrecision }: { value: number, maxDisplayPrecision: number }) => {
const format = useNumberFormatter({ maximumFractionDigits: maxDisplayPrecision });
const LocaleNumber = ({
value,
maxDisplayPrecision,
}: {
value: number;
maxDisplayPrecision: number;
}) => {
const format = useNumberFormatter({
maximumFractionDigits: maxDisplayPrecision,
});
return format.format(value);
};
Loading