import LineChart from '@/components/line-chart'; import { useTranslate } from '@/hooks/common-hooks'; import { IStats } from '@/interfaces/database/chat'; import { formatDate } from '@/utils/date'; import camelCase from 'lodash/camelCase'; import { useSelectChartStatsList } from '../hooks'; import styles from './index.less'; const StatsLineChart = ({ statsType }: { statsType: keyof IStats }) => { const { t } = useTranslate('chat'); const chartList = useSelectChartStatsList(); const list = chartList[statsType]?.map((x) => ({ ...x, xAxis: formatDate(x.xAxis), })) ?? []; return (
{t(camelCase(statsType))}
); }; const StatsChart = () => { return (
); }; export default StatsChart;