import {Link} from 'react-router-dom'; import {useTranslation} from 'react-i18next'; import {ArrowRight, Trophy} from 'lucide-react'; import {Button} from '@/components/ui/button'; import {Card} from '@/components/ui/card'; import GameCover from './GameCover.jsx'; import {formatPlaytime} from '../utils/games.js'; export default function MostPlayedCard({games, syncing}) { const {t} = useTranslation(); const maxMinutes = games[0]?.playtimeMinutes || 1; return (

{t('DASHBOARD.MOST_PLAYED')}

{games.length === 0 ? (

{syncing ? t('LIBRARY.SYNCING_FIRST_TIME') : t('LIBRARY.EMPTY')}

) : (
    {games.map((g, index) => (
  1. {index + 1}
    {g.name ?? `App ${g.appid}`}
    {formatPlaytime(g.playtimeMinutes)}
  2. ))}
)}
); }