Skip to content

Commit f23f06a

Browse files
authored
fix(nextjs-insights): fix percentage formatting for small numbers (#93503)
1 parent 540ef12 commit f23f06a

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

static/app/views/insights/pages/platform/shared/table/ErrorRateCell.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import Link from 'sentry/components/links/link';
66
import {space} from 'sentry/styles/space';
77
import {defined} from 'sentry/utils';
88
import {formatAbbreviatedNumber} from 'sentry/utils/formatters';
9+
import {formatPercentage} from 'sentry/utils/number/formatPercentage';
910
import {ThresholdCell} from 'sentry/views/insights/pages/platform/shared/table/ThresholdCell';
1011

1112
export function getErrorCellIssuesLink({
@@ -46,7 +47,8 @@ export function ErrorRateCell({
4647
return (
4748
<ThresholdCell value={errorRate}>
4849
<Flex align="center" justify="flex-end" gap={space(0.5)}>
49-
{(errorRate * 100).toFixed(2)}%{defined(errorCount) ? errorCountElement : null}
50+
{formatPercentage(errorRate, 2, {minimumValue: 0.0001})}
51+
{defined(errorCount) ? errorCountElement : null}
5052
</Flex>
5153
</ThresholdCell>
5254
);

0 commit comments

Comments
 (0)