import { Card, Text, Stack, Group, UnstyledButton, Badge, } from "@mantine/core"; import { TournamentInfo } from "@/features/tournaments/types"; import { TrophyIcon, CrownIcon, MedalIcon, } from "@phosphor-icons/react"; import { useNavigate } from "@tanstack/react-router"; import Avatar from "@/components/avatar"; interface TournamentCardProps { tournament: TournamentInfo; } export const TournamentCard = ({ tournament }: TournamentCardProps) => { const navigate = useNavigate(); return ( navigate({ to: `/tournaments/${tournament.id}` })} style={{ borderRadius: "var(--mantine-radius-md)" }} styles={{ root: { "&:hover": { transform: "translateY(-2px)", transition: "transform 0.15s ease", }, }, }} > {tournament.name} {(tournament.first_place || tournament.second_place || tournament.third_place) && ( {tournament.first_place && ( } style={{ textTransform: 'none', fontWeight: 600, color: 'white', }} > {tournament.first_place.name} )} {tournament.second_place && ( } style={{ textTransform: 'none', fontWeight: 500, }} > {tournament.second_place.name} )} {tournament.third_place && ( } style={{ textTransform: 'none', fontWeight: 500, }} > {tournament.third_place.name} )} )} ); };