From 503321d43ba7ee04f1b42706042e66109e28709e Mon Sep 17 00:00:00 2001 From: moonrailgun Date: Mon, 30 Oct 2023 22:14:40 +0800 Subject: [PATCH] perf: short website overview display --- src/client/components/website/MetricsTable.tsx | 8 ++------ src/client/utils/common.ts | 8 ++++++-- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/client/components/website/MetricsTable.tsx b/src/client/components/website/MetricsTable.tsx index 17fc9bd..3169e31 100644 --- a/src/client/components/website/MetricsTable.tsx +++ b/src/client/components/website/MetricsTable.tsx @@ -4,7 +4,7 @@ import React from 'react'; import { AppRouterOutput, trpc } from '../../api/trpc'; import { useCurrentWorkspaceId } from '../../store/user'; import { sum } from 'lodash-es'; -import millify from 'millify'; +import { formatNumber } from '../../utils/common'; type MetricsItemType = AppRouterOutput['website']['metrics'][number]; @@ -53,11 +53,7 @@ export const MetricsTable: React.FC = React.memo((props) => { return (
-
- {millify(val, { - lowercase: true, - })} -
+
{formatNumber(val)}