i18n
This commit is contained in:
@@ -9,6 +9,7 @@ import { useSheet } from "@/hooks/use-sheet";
|
||||
import Sheet from "@/components/sheet/sheet";
|
||||
import TeamHeadToHeadSheet from "./team-head-to-head-sheet";
|
||||
import AnimatedScore from "./animated-score";
|
||||
import { Trans, useLingui } from "@lingui/react/macro";
|
||||
|
||||
interface MatchCardProps {
|
||||
match: Match;
|
||||
@@ -18,6 +19,7 @@ interface MatchCardProps {
|
||||
const MatchCard = ({ match, hideH2H = false }: MatchCardProps) => {
|
||||
const navigate = useNavigate();
|
||||
const h2hSheet = useSheet();
|
||||
const { t } = useLingui();
|
||||
const isHomeWin = match.home_cups > match.away_cups;
|
||||
const isAwayWin = match.away_cups > match.home_cups;
|
||||
const isStarted = match.status === "started";
|
||||
@@ -71,19 +73,19 @@ const MatchCard = ({ match, hideH2H = false }: MatchCardProps) => {
|
||||
<>
|
||||
<Text c="dimmed">-</Text>
|
||||
<Text size="xs" c="dimmed">
|
||||
Round {match.round + 1}
|
||||
{match.is_losers_bracket && " (Losers)"}
|
||||
<Trans>Round {match.round + 1}</Trans>
|
||||
{match.is_losers_bracket && <Trans> (Losers)</Trans>}
|
||||
</Text>
|
||||
</>
|
||||
)}
|
||||
</Group>
|
||||
{match.home && match.away && !hideH2H && !hasPrivate && (
|
||||
<Tooltip label="Head to Head" withArrow position="left">
|
||||
<Tooltip label={t`Head to Head`} withArrow position="left">
|
||||
<ActionIcon
|
||||
variant="subtle"
|
||||
size="sm"
|
||||
onClick={handleH2HClick}
|
||||
aria-label="View head-to-head"
|
||||
aria-label={t`View head-to-head`}
|
||||
w={40}
|
||||
>
|
||||
<Group style={{ position: 'relative', width: 27.5, height: 16 }}>
|
||||
@@ -226,7 +228,7 @@ const MatchCard = ({ match, hideH2H = false }: MatchCardProps) => {
|
||||
|
||||
{match.home && match.away && !hideH2H && h2hSheet.isOpen && (
|
||||
<Sheet
|
||||
title="Head to Head"
|
||||
title={t`Head to Head`}
|
||||
{...h2hSheet.props}
|
||||
>
|
||||
<TeamHeadToHeadSheet team1={match.home} team2={match.away} isOpen={h2hSheet.props.opened} />
|
||||
|
||||
Reference in New Issue
Block a user