forked from Transparency/kgroad-frontend2
34 lines
948 B
TypeScript
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;
|