2023-06-07 11:54:50 +08:00
|
|
|
import React from 'react';
|
2024-04-01 15:49:45 +08:00
|
|
|
import type { StatisticProps } from 'antd';
|
2023-07-28 16:17:43 +08:00
|
|
|
import { Col, Row, Statistic } from 'antd';
|
2024-04-01 15:49:45 +08:00
|
|
|
import CountUp from 'react-countup';
|
2023-01-05 14:07:33 +08:00
|
|
|
|
2024-04-01 15:49:45 +08:00
|
|
|
const formatter: StatisticProps['formatter'] = (value) => (
|
|
|
|
<CountUp end={value as number} separator="," />
|
|
|
|
);
|
2023-01-05 14:07:33 +08:00
|
|
|
|
|
|
|
const App: React.FC = () => (
|
|
|
|
<Row gutter={16}>
|
|
|
|
<Col span={12}>
|
|
|
|
<Statistic title="Active Users" value={112893} formatter={formatter} />
|
|
|
|
</Col>
|
|
|
|
<Col span={12}>
|
|
|
|
<Statistic title="Account Balance (CNY)" value={112893} precision={2} formatter={formatter} />
|
|
|
|
</Col>
|
|
|
|
</Row>
|
|
|
|
);
|
|
|
|
|
|
|
|
export default App;
|