Development #26
@@ -1,4 +1,4 @@
|
|||||||
import { Stack, Text } from "@mantine/core";
|
import { MantineSpacing, Stack, Text } from "@mantine/core";
|
||||||
import { useMemo } from "react";
|
import { useMemo } from "react";
|
||||||
import { Match } from "../types";
|
import { Match } from "../types";
|
||||||
import MatchCard from "./match-card";
|
import MatchCard from "./match-card";
|
||||||
@@ -7,9 +7,10 @@ import { Trans } from "@lingui/react/macro";
|
|||||||
interface MatchListProps {
|
interface MatchListProps {
|
||||||
matches: Match[];
|
matches: Match[];
|
||||||
hideH2H?: boolean;
|
hideH2H?: boolean;
|
||||||
|
p?: MantineSpacing;
|
||||||
}
|
}
|
||||||
|
|
||||||
const MatchList = ({ matches, hideH2H = false }: MatchListProps) => {
|
const MatchList = ({ matches, hideH2H = false, p = "md" }: MatchListProps) => {
|
||||||
const filteredMatches = useMemo(
|
const filteredMatches = useMemo(
|
||||||
() =>
|
() =>
|
||||||
[...(matches ?? [])]
|
[...(matches ?? [])]
|
||||||
@@ -27,7 +28,7 @@ const MatchList = ({ matches, hideH2H = false }: MatchListProps) => {
|
|||||||
const isRegional = filteredMatches[0]?.tournament?.regional;
|
const isRegional = filteredMatches[0]?.tournament?.regional;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Stack p="md" gap="sm">
|
<Stack p={p} gap="sm">
|
||||||
{isRegional && (
|
{isRegional && (
|
||||||
<Text size="xs" c="dimmed" ta="center" px="md">
|
<Text size="xs" c="dimmed" ta="center" px="md">
|
||||||
<Trans>Matches for regionals are unordered</Trans>
|
<Trans>Matches for regionals are unordered</Trans>
|
||||||
|
|||||||
@@ -200,10 +200,10 @@ const TeamHeadToHeadContent = ({ team1, team2, isOpen = true }: TeamHeadToHeadSh
|
|||||||
</Stack>
|
</Stack>
|
||||||
|
|
||||||
<Stack gap="xs">
|
<Stack gap="xs">
|
||||||
<Text size="sm" fw={600} px="md">
|
<Text size="sm" fw={600}>
|
||||||
<Trans>Match History (<Plural value={totalMatches} one="# match" other="# matches" />)</Trans>
|
<Trans>Match History (<Plural value={totalMatches} one="# match" other="# matches" />)</Trans>
|
||||||
</Text>
|
</Text>
|
||||||
<MatchList matches={matches} hideH2H />
|
<MatchList matches={matches} hideH2H p={0} />
|
||||||
</Stack>
|
</Stack>
|
||||||
</Stack>
|
</Stack>
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -260,10 +260,10 @@ const PlayerHeadToHeadContent = ({
|
|||||||
</Stack>
|
</Stack>
|
||||||
|
|
||||||
<Stack gap="xs">
|
<Stack gap="xs">
|
||||||
<Text size="sm" fw={600} px="md">
|
<Text size="sm" fw={600}>
|
||||||
<Trans>Match History ({totalMatches})</Trans>
|
<Trans>Match History ({totalMatches})</Trans>
|
||||||
</Text>
|
</Text>
|
||||||
<MatchList matches={matches} hideH2H />
|
<MatchList matches={matches} hideH2H p={0} />
|
||||||
</Stack>
|
</Stack>
|
||||||
</Stack>
|
</Stack>
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -1621,7 +1621,7 @@ msgstr "Match gestartet!"
|
|||||||
msgid "Matches"
|
msgid "Matches"
|
||||||
msgstr "Matches"
|
msgstr "Matches"
|
||||||
|
|
||||||
#: src/features/matches/components/match-list.tsx:33
|
#: src/features/matches/components/match-list.tsx:34
|
||||||
msgid "Matches for regionals are unordered"
|
msgid "Matches for regionals are unordered"
|
||||||
msgstr "Matches für Regionals sind ungeordnet"
|
msgstr "Matches für Regionals sind ungeordnet"
|
||||||
|
|
||||||
|
|||||||
@@ -1621,7 +1621,7 @@ msgstr "Match started!"
|
|||||||
msgid "Matches"
|
msgid "Matches"
|
||||||
msgstr "Matches"
|
msgstr "Matches"
|
||||||
|
|
||||||
#: src/features/matches/components/match-list.tsx:33
|
#: src/features/matches/components/match-list.tsx:34
|
||||||
msgid "Matches for regionals are unordered"
|
msgid "Matches for regionals are unordered"
|
||||||
msgstr "Matches for regionals are unordered"
|
msgstr "Matches for regionals are unordered"
|
||||||
|
|
||||||
|
|||||||
@@ -1621,7 +1621,7 @@ msgstr "¡Empezó el partido!"
|
|||||||
msgid "Matches"
|
msgid "Matches"
|
||||||
msgstr "Partidos"
|
msgstr "Partidos"
|
||||||
|
|
||||||
#: src/features/matches/components/match-list.tsx:33
|
#: src/features/matches/components/match-list.tsx:34
|
||||||
msgid "Matches for regionals are unordered"
|
msgid "Matches for regionals are unordered"
|
||||||
msgstr "Los partidos de regionales no tienen un orden específico"
|
msgstr "Los partidos de regionales no tienen un orden específico"
|
||||||
|
|
||||||
|
|||||||
@@ -1621,7 +1621,7 @@ msgstr "試合開始!"
|
|||||||
msgid "Matches"
|
msgid "Matches"
|
||||||
msgstr "試合"
|
msgstr "試合"
|
||||||
|
|
||||||
#: src/features/matches/components/match-list.tsx:33
|
#: src/features/matches/components/match-list.tsx:34
|
||||||
msgid "Matches for regionals are unordered"
|
msgid "Matches for regionals are unordered"
|
||||||
msgstr "地区予選の試合は順不同です"
|
msgstr "地区予選の試合は順不同です"
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user