import {Link} from 'react-router-dom'; import {useTranslation} from 'react-i18next'; import {Trophy} from 'lucide-react'; import {Card} from '@/components/ui/card'; import {cn} from '@/lib/utils'; import PlatformIcons from './PlatformIcons.jsx'; import {formatPlaytime} from '../utils/games.js'; import {formatDate} from '../utils/format.js'; import {platformLabel} from '../utils/platforms.js'; /** * One row per platform of the game: playtime, last played and the progress of that platform. A row of another edition * links to that edition, whose page lists its achievements. */ export default function PlatformsCard({game}) { const {t, i18n} = useTranslation(); const lines = game.platforms; if (!lines?.length) return null; return (

{t('PLATFORMS.TITLE')}

{lines.length > 1 && (

{t('PLATFORMS.TOTAL')} {formatPlaytime(game.totalPlaytimeMinutes)}

)}
); }