한국 경기 한국 좌측 고정, 국가명 한글 통일
This commit is contained in:
1 parent
8580bbb713
commit
90d00a817b
5 files changed
+111
-38
No files matched your search
@@ -1,6 +1,6 @@
|
||||
import type { Match } from "@/lib/types";
|
||||
import { kickoffDisplay } from "@/lib/format";
|
||||
import { type Lang, dict } from "@/lib/i18n";
|
||||
import { type Lang, dict, teamShort } from "@/lib/i18n";
|
||||
import BallIcon from "./BallIcon";
|
||||
import TeamFlag from "./TeamFlag";
|
||||
|
||||
@@ -8,6 +8,12 @@ export default function MatchupHUD({ match, lang = "ko" }: { match: Match; lang?
|
||||
const t = dict(lang);
|
||||
const { group } = match;
|
||||
const finished = !!match.result;
|
||||
// 한국을 항상 왼쪽에 표시(요청). 데이터/투표는 원본 A/B 프레임 유지, 화면 좌우만 교체.
|
||||
const flip = match.teamB.code === "KOR" && match.teamA.code !== "KOR";
|
||||
const left = flip ? match.teamB : match.teamA;
|
||||
const right = flip ? match.teamA : match.teamB;
|
||||
const leftScore = flip ? match.result?.scoreB : match.result?.scoreA;
|
||||
const rightScore = flip ? match.result?.scoreA : match.result?.scoreB;
|
||||
return (
|
||||
<section className="mt-6">
|
||||
{/* 대결 카드 (녹색 글로우 보더) */}
|
||||
@@ -20,8 +26,8 @@ export default function MatchupHUD({ match, lang = "ko" }: { match: Match; lang?
|
||||
<BallIcon className="h-14 w-14 shrink-0" />
|
||||
<div className="min-w-0">
|
||||
<div className="text-[22px] font-extrabold leading-tight">
|
||||
{match.teamA.name} <span className="text-white/55">vs</span>{" "}
|
||||
{match.teamB.name}
|
||||
{teamShort(left, lang)} <span className="text-white/55">vs</span>{" "}
|
||||
{teamShort(right, lang)}
|
||||
</div>
|
||||
<div className="mt-1 text-[15px] font-bold text-[var(--green)]">
|
||||
{kickoffDisplay(match.kickoffKst, lang)} · {t.group(group)}
|
||||
@@ -32,14 +38,14 @@ export default function MatchupHUD({ match, lang = "ko" }: { match: Match; lang?
|
||||
|
||||
{/* 국기 + 라이트닝 VS (종료 시 최종 스코어) */}
|
||||
<div className="mt-5 grid grid-cols-[1fr_auto_1fr] items-center gap-3">
|
||||
<TeamFlag team={match.teamA} className="mx-auto h-[68px] w-[104px]" />
|
||||
<TeamFlag team={left} className="mx-auto h-[68px] w-[104px]" />
|
||||
<div className="relative grid place-items-center">
|
||||
<div className="vs-glow absolute h-28 w-28" />
|
||||
{finished && match.result ? (
|
||||
<span className="relative whitespace-nowrap font-mono text-[34px] font-extrabold tabular-nums text-white">
|
||||
{match.result.scoreA}
|
||||
{leftScore}
|
||||
<span className="px-1 text-white/55">-</span>
|
||||
{match.result.scoreB}
|
||||
{rightScore}
|
||||
</span>
|
||||
) : (
|
||||
<span
|
||||
@@ -50,7 +56,7 @@ export default function MatchupHUD({ match, lang = "ko" }: { match: Match; lang?
|
||||
</span>
|
||||
)}
|
||||
</div>
|
||||
<TeamFlag team={match.teamB} className="mx-auto h-[68px] w-[104px]" />
|
||||
<TeamFlag team={right} className="mx-auto h-[68px] w-[104px]" />
|
||||
</div>
|
||||
|
||||
{finished && (
|
||||
|
||||
Reference in new issue
Block a user