kgroad-frontend2/src/widgets/StatisticsSection/StatisticsSection.tsx
Vladislav Khorev e0e2f5470d renamed folders
2024-02-14 08:04:02 +00:00

34 lines
948 B
TypeScript

import { ROAD_TYPES_STATS } from "@/shared/variables/road-types";
import "./StatisticsSection.scss";
import { statiscsSectionStore } from "./statisticsSection.store";
const StatisticsSection = async () => {
// const { getStatsCount, getErrorMessage } = statiscsSectionStore();
// const statistics = await getStatsCount();
// const error = getErrorMessage();
const mockArray = [
{ category: 1, count: 132 },
{ category: 2, count: 12 },
{ category: 3, count: 1432 },
{ category: 4, count: 18 },
{ category: 5, count: 95 },
{ category: 6, count: 54 },
];
return (
<section className="statistics-section">
<ul className="statistics-section__list">
{mockArray.map((cat) => (
<li key={cat.category}>
<p>{ROAD_TYPES_STATS[cat.category]}</p>
<span>{cat.count}</span>
</li>
))}
</ul>
</section>
);
};
export default StatisticsSection;