import { Link } from "wouter"; import type { ServerGame } from "../../shared/game"; import { formatRelativeTime, formatTimeSpan } from "../../shared/time"; import { Button } from "./Button"; interface PastMatchProps { game: ServerGame; } const PastMatch = ({ game }: PastMatchProps) => { return (
Endless
{formatRelativeTime(game.finished)}
Stage {game.stage}
Mines Remaining:{" "} {game.minesCount - game.isFlagged.flat().filter((f) => f).length}
Duration: {formatTimeSpan(game.finished - game.started)}
{/* @ts-expect-error as is cheaply typed */}
); }; export default PastMatch;