fix(stats): open game detail pages from stat lists, perfect games clickable

Add perfect games click-through on the dashboard. Remove Steam store
links from game lists. Stat numbers with count 0 are not clickable.
Tests cover the perfect-games click, zero guards, and owner versus
visitor behavior.
This commit is contained in:
lobo committed 2026-10-04 10:07:27 +02:00
1 parent 777ba87fd6
commit 8b94a25844
27 files changed
+270 -51

No files matched your search

+1 -4
View File
@@ -17,7 +17,6 @@ import {TagBars} from '../components/stats/TasteStats.jsx';
import {StatDrillProvider, useStatDrill, useTagDrill} from '../components/stats/StatDrill.jsx';
import useSession from '../hooks/useSession.js';
import {genreKey} from '../utils/stats.js';
import {gameHref} from '../utils/statGames.js';
import usePublicStats from '../hooks/usePublicStats.js';
@@ -51,11 +50,9 @@ function RankedGames({title, games, formatValue, drillKey}) {
}
function GameName({game}) {
const href = gameHref(game.appid, false);
const name = <FitText text={game.name ?? `App ${game.appid}`}/>;
return (
<span className="@container min-w-0 flex-1 font-medium">
{href ? <a href={href} target="_blank" rel="noopener noreferrer" className="hover:text-primary">{name}</a> : name}
<FitText text={game.name ?? `App ${game.appid}`}/>
</span>
);
}