import { vipnagorgialla } from "@/components/Vipnagorgialla"; import Image from "next/image"; import Link from "next/link"; import { getTranslations, setRequestLocale } from "next-intl/server"; import { miniTournaments } from "@/data/miniturniirid"; /** Horizontal padding used by the page (64px at the design width). */ const GUTTER = "px-4 sm:px-8 lg:px-16"; // TODO: replace with the real mini-tournaments rules URL once it exists. // Placeholder points at the TipiLAN ruleset repo root. const RULES_URL = "https://git.edunaut.ee/slunk/TipiLAN_reeglistik_ruleset"; /** * One mini-tournament tile: a cyan-bordered cover image above a bold caption * "Title – Prize". Games without artwork yet fall back to a text tile. */ function MiniCard({ title, prizePool, format, includesGiftBags, organizer, organizerUrl, image, organizedBy, giftBagsLabel, }: (typeof miniTournaments)[number] & { organizedBy: string; giftBagsLabel: string; }) { return (
{image ? ( {title} ) : ( {title} )}
{title}{format ? `, ${format}` : ""} - {prizePool === "giftBags" ? ( {giftBagsLabel} ) : ( {prizePool} )} {includesGiftBags && prizePool !== "giftBags" && ( <> + {giftBagsLabel} )}
{organizer && ( {organizedBy}: {organizerUrl ? ( {organizer} ) : ( {organizer} )} )}
); } export default async function MiniTournaments({ params, }: { params: Promise<{ locale: string }>; }) { const { locale } = await params; setRequestLocale(locale); const t = await getTranslations({ locale }); return (
{/* Header */}

{t("minipage.title")}

{t("minipage.date")}

{t("minipage.description")}

{/* Buttons */}
{t("minipage.readRules")} {t("minipage.buyTicket")}
{/* Tournament groups */}
{["simRacing", "fightingGames", "other"].map((category) => { const games = miniTournaments.filter((game) => game.category === category); return (

{t(`minipage.categories.${category}`)}

{games.map((game) => ( ))}
); })}
); }