import clsx from "clsx"; import { MousePointerClick } from "lucide-react"; import { useTranslation } from "react-i18next"; import type { ModeShort } from "~/modules/in-game-lists/types"; import type { CommonUser } from "~/utils/kysely.server"; import { Avatar } from "../Avatar"; import { ModeImage } from "../Image"; import styles from "./MatchBannerBottomRow.module.css"; interface MatchBannerBottomRowProps { games: Array<{ mode: ModeShort | null; winner?: "ALPHA" | "BRAVO" }>; activeRosters: { alpha: CommonUser[] | null; bravo: CommonUser[] | null; } | null; } export function MatchBannerBottomRow({ games, activeRosters, }: MatchBannerBottomRowProps) { return (
); } function ModeProgress({ games }: Pick) { const knownModes = games.flatMap((game) => (game.mode ? [game.mode] : [])); const allSameMode = knownModes.length === games.length && games.length > 1 && knownModes.every((mode) => mode === knownModes[0]); if (allSameMode) { return (
×{games.length}
); } return (
{games.map((game, i) => game.mode ? (
) : (
), )}
); } function Roster({ users }: { users: CommonUser[] }) { return (
{users.map((user) => ( ))}
); } function ActiveRosters({ activeRosters, }: Pick) { const { t } = useTranslation(["q"]); if (!activeRosters?.alpha || !activeRosters.bravo) { return null; } return (
{t("q:match.banner.vs")}
); }