fix: dashboard re-render

This commit is contained in:
jialin
2024-07-04 17:43:39 +08:00
parent ed3f9f7e96
commit e9d8828dcd
42 changed files with 240 additions and 1442 deletions
@@ -0,0 +1,27 @@
import CardWrapper from '@/components/card-wrapper';
import HBar from '@/components/echarts/h-bar';
import { useIntl } from '@umijs/max';
import React from 'react';
interface TopUserProps {
userData: { name: string; value: number }[];
topUserList: string[];
}
const TopUser: React.FC<TopUserProps> = (props) => {
console.log('TopUser=====================');
const { userData, topUserList } = props;
const intl = useIntl();
return (
<CardWrapper>
<HBar
title={intl.formatMessage({ id: 'dashboard.topusers' })}
seriesData={userData}
xAxisData={topUserList}
height={360}
></HBar>
</CardWrapper>
);
};
export default React.memo(TopUser);