i18n
This commit is contained in:
@@ -6,31 +6,36 @@ import SwipeableTabs from "@/components/swipeable-tabs";
|
||||
import { useTournament } from "../../queries";
|
||||
import MatchList from "@/features/matches/components/match-list";
|
||||
import { TournamentStats } from "../tournament-stats";
|
||||
import { useLingui } from "@lingui/react/macro";
|
||||
|
||||
interface ProfileProps {
|
||||
id: string;
|
||||
}
|
||||
|
||||
const Profile = ({ id }: ProfileProps) => {
|
||||
const { t } = useLingui();
|
||||
const { data: tournament } = useTournament(id);
|
||||
if (!tournament) return null;
|
||||
|
||||
const tabs = useMemo(() => [
|
||||
{
|
||||
label: "Overview",
|
||||
label: t`Overview`,
|
||||
value: "overview",
|
||||
content: <TournamentStats tournament={tournament} />
|
||||
},
|
||||
{
|
||||
label: "Matches",
|
||||
label: t`Matches`,
|
||||
value: "matches",
|
||||
content: <MatchList matches={tournament.matches?.sort((a, b) => b.order - a.order) || []} />
|
||||
},
|
||||
{
|
||||
label: "Teams",
|
||||
label: t`Teams`,
|
||||
value: "teams",
|
||||
content: <>
|
||||
<TeamList teams={tournament.teams || []} isRegional={tournament.regional} />
|
||||
</>
|
||||
}
|
||||
], [tournament]);
|
||||
], [tournament, t]);
|
||||
|
||||
return <>
|
||||
<Header tournament={tournament} />
|
||||
|
||||
Reference in New Issue
Block a user