fix: zobrazení popisů funkcí místo varnames ve statistikách (#26)
Some checks failed
ci/woodpecker/push/workflow Pipeline failed

This commit was merged in pull request #25.
This commit is contained in:
2026-02-04 13:40:20 +01:00
parent 6f43c74769
commit 2b7197eff6

View File

@@ -4,7 +4,7 @@ import Header from "../components/Header";
import { useAuth } from "../context/auth"; import { useAuth } from "../context/auth";
import Login from "../Login"; import Login from "../Login";
import { formatDate, getFirstWorkDayOfWeek, getHumanDate, getLastWorkDayOfWeek } from "../Utils"; import { formatDate, getFirstWorkDayOfWeek, getHumanDate, getLastWorkDayOfWeek } from "../Utils";
import { WeeklyStats, LunchChoice, VotingStats, getStats, getVotingStats } from "../../../types"; import { WeeklyStats, LunchChoice, VotingStats, FeatureRequest, getStats, getVotingStats } from "../../../types";
import Loader from "../components/Loader"; import Loader from "../components/Loader";
import { faChevronLeft, faChevronRight, faGear } from "@fortawesome/free-solid-svg-icons"; import { faChevronLeft, faChevronRight, faGear } from "@fortawesome/free-solid-svg-icons";
import { Legend, Line, LineChart, Tooltip, XAxis, YAxis } from "recharts"; import { Legend, Line, LineChart, Tooltip, XAxis, YAxis } from "recharts";
@@ -155,7 +155,7 @@ export default function StatsPage() {
<tbody> <tbody>
{sortedVotingStats.map(([feature, count]) => ( {sortedVotingStats.map(([feature, count]) => (
<tr key={feature}> <tr key={feature}>
<td>{feature}</td> <td>{FeatureRequest[feature as keyof typeof FeatureRequest] ?? feature}</td>
<td>{count as number}</td> <td>{count as number}</td>
</tr> </tr>
))} ))}