Public Access
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:
1 parent
777ba87fd6
commit
8b94a25844
27 files changed
+270
-51
No files matched your search
@@ -6,6 +6,7 @@ import {ArrowRight, Gamepad2} from 'lucide-react';
|
||||
import {Card} from '@/components/ui/card';
|
||||
|
||||
const DURATION_MS = 1000;
|
||||
const COUNT_CLASS = 'block text-5xl font-bold tracking-tight tabular-nums';
|
||||
|
||||
const SteamGameCount = ({targetCount}) => {
|
||||
const {t} = useTranslation();
|
||||
@@ -33,7 +34,9 @@ const SteamGameCount = ({targetCount}) => {
|
||||
<Gamepad2 className="size-5"/>
|
||||
</div>
|
||||
<div>
|
||||
<Link to="/library" className="block text-5xl font-bold tracking-tight tabular-nums hover:text-primary">{count}</Link>
|
||||
{targetCount > 0
|
||||
? <Link to="/library" className={`${COUNT_CLASS} hover:text-primary`}>{count}</Link>
|
||||
: <span className={COUNT_CLASS}>{count}</span>}
|
||||
<div className="mt-1 text-sm text-muted-foreground">{t('DASHBOARD.STEAM_GAMES')}</div>
|
||||
</div>
|
||||
<Link to="/library" className="inline-flex items-center gap-1 text-sm font-medium text-primary hover:underline">
|
||||
|
||||
Reference in new issue
Block a user