import { useState } from 'react' import type { Game } from '../types' const DEFAULT_COLOR = '#6366f1' // indigo-500 interface GameCardProps { game: Game selected: boolean onSelect: (game: Game) => void } export function GameCard({ game, selected, onSelect }: GameCardProps) { const backgroundColor = game.color ?? DEFAULT_COLOR const [imgIdx, setImgIdx] = useState(0) const boxArtSrcs = [`/boxart/${game.slug}.png`, `/boxart/${game.slug}.jpg`] return ( ) }