feat(ui): 100만원 챌린지 룰 설명 모달 추가
'100만 원에 도전하기' 버튼 클릭 시 모달 표시 — 배점표(정확5/근접3/승패2/부분1/빗나감0), 누적 1위 상금, 이메일 기준 참여·집계 안내. KO/EN 지원. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>develop
parent
d8db7ed0f4
commit
51352c7c5c
|
|
@ -49,6 +49,7 @@ export default function Arena({
|
||||||
const [copied, setCopied] = useState(false);
|
const [copied, setCopied] = useState(false);
|
||||||
const [submitting, setSubmitting] = useState(false);
|
const [submitting, setSubmitting] = useState(false);
|
||||||
const [error, setError] = useState<string | null>(null);
|
const [error, setError] = useState<string | null>(null);
|
||||||
|
const [showRules, setShowRules] = useState(false);
|
||||||
|
|
||||||
// 점수 선택 시 승/무/패 자동 선택 (스코어가 결과의 소스)
|
// 점수 선택 시 승/무/패 자동 선택 (스코어가 결과의 소스)
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
|
|
@ -359,12 +360,69 @@ export default function Arena({
|
||||||
{t.goldDesc}
|
{t.goldDesc}
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
<button className="gold-btn shrink-0 whitespace-pre-line rounded-xl px-4 py-3.5 text-[14px] font-extrabold leading-tight active:scale-[0.98]">
|
<button
|
||||||
|
onClick={() => setShowRules(true)}
|
||||||
|
className="gold-btn shrink-0 whitespace-pre-line rounded-xl px-4 py-3.5 text-[14px] font-extrabold leading-tight active:scale-[0.98]"
|
||||||
|
>
|
||||||
{t.goldBtn}
|
{t.goldBtn}
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
|
{/* ===== 룰 설명 모달 ===== */}
|
||||||
|
{showRules && (
|
||||||
|
<div
|
||||||
|
className="fixed inset-0 z-50 flex items-center justify-center bg-black/65 p-4"
|
||||||
|
onClick={() => setShowRules(false)}
|
||||||
|
>
|
||||||
|
<div
|
||||||
|
className="w-full max-w-[420px] rounded-2xl border border-[var(--gold-border)]/45 bg-[var(--bg2)] p-5"
|
||||||
|
style={{ boxShadow: "0 20px 60px rgba(0,0,0,0.6)" }}
|
||||||
|
onClick={(e) => e.stopPropagation()}
|
||||||
|
>
|
||||||
|
<div className="flex items-center gap-1.5 text-[18px] font-extrabold text-[var(--gold-border)]">
|
||||||
|
<span>{t.rulesTitle}</span>
|
||||||
|
<span>★</span>
|
||||||
|
</div>
|
||||||
|
<p className="mt-2 text-[13px] leading-snug text-white/80">{t.rulesCumulative}</p>
|
||||||
|
|
||||||
|
<div className="mt-4 space-y-1.5">
|
||||||
|
{(
|
||||||
|
[
|
||||||
|
[t.rulesExact, 5],
|
||||||
|
[t.rulesCloseGrade, 3],
|
||||||
|
[t.rulesOutcome, 2],
|
||||||
|
[t.rulesPartial, 1],
|
||||||
|
[t.rulesMiss, 0],
|
||||||
|
] as [string, number][]
|
||||||
|
).map(([label, pt]) => (
|
||||||
|
<div
|
||||||
|
key={label}
|
||||||
|
className="flex items-center justify-between rounded-lg border border-[var(--line-d)] px-3 py-2 text-[13px]"
|
||||||
|
>
|
||||||
|
<span className="font-semibold text-white/85">{label}</span>
|
||||||
|
<span className="font-extrabold text-[var(--green)]">
|
||||||
|
{pt}
|
||||||
|
{lang === "en" ? " pt" : "점"}
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
))}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<p className="mt-4 rounded-lg border border-[var(--mint)]/35 bg-[var(--mint)]/10 px-3 py-2.5 text-[12.5px] font-bold leading-snug text-[var(--mint)]">
|
||||||
|
{t.rulesEmailRequired}
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<button
|
||||||
|
onClick={() => setShowRules(false)}
|
||||||
|
className="btn-mint mt-4 w-full rounded-xl py-3 text-[15px] font-extrabold active:scale-[0.99]"
|
||||||
|
>
|
||||||
|
{t.rulesCloseBtn}
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
|
|
||||||
{/* ===== Crowd Pick (003) — 보팅 비율(≠ AI 승리 확률) ===== */}
|
{/* ===== Crowd Pick (003) — 보팅 비율(≠ AI 승리 확률) ===== */}
|
||||||
<section className="mt-6">
|
<section className="mt-6">
|
||||||
<div className="mb-2.5 text-[20px] font-extrabold">
|
<div className="mb-2.5 text-[20px] font-extrabold">
|
||||||
|
|
|
||||||
|
|
@ -74,6 +74,15 @@ type Dict = {
|
||||||
copied: string;
|
copied: string;
|
||||||
goldDesc: string;
|
goldDesc: string;
|
||||||
goldBtn: string;
|
goldBtn: string;
|
||||||
|
rulesTitle: string;
|
||||||
|
rulesCumulative: string;
|
||||||
|
rulesExact: string;
|
||||||
|
rulesCloseGrade: string;
|
||||||
|
rulesOutcome: string;
|
||||||
|
rulesPartial: string;
|
||||||
|
rulesMiss: string;
|
||||||
|
rulesEmailRequired: string;
|
||||||
|
rulesCloseBtn: string;
|
||||||
crowdSub: string;
|
crowdSub: string;
|
||||||
finalResult: string;
|
finalResult: string;
|
||||||
hit: string;
|
hit: string;
|
||||||
|
|
@ -133,6 +142,16 @@ export const DICT: Record<Lang, Dict> = {
|
||||||
copied: "복사됨 ✓",
|
copied: "복사됨 ✓",
|
||||||
goldDesc: "경기마다 승패·스코어를 맞혀 포인트를 쌓고, 누적 1위에게 최종 100만원",
|
goldDesc: "경기마다 승패·스코어를 맞혀 포인트를 쌓고, 누적 1위에게 최종 100만원",
|
||||||
goldBtn: "100만 원에\n도전하기",
|
goldBtn: "100만 원에\n도전하기",
|
||||||
|
rulesTitle: "100만 원 챌린지 룰",
|
||||||
|
rulesCumulative: "경기마다 적중 포인트를 쌓아, 대회 누적 포인트 1위 한 분에게 최종 100만 원을 드립니다.",
|
||||||
|
rulesExact: "정확 스코어 적중",
|
||||||
|
rulesCloseGrade: "근접 (승패 + 득실차 일치)",
|
||||||
|
rulesOutcome: "승패만 적중",
|
||||||
|
rulesPartial: "부분 (한 팀 스코어만 일치)",
|
||||||
|
rulesMiss: "빗나감",
|
||||||
|
rulesEmailRequired:
|
||||||
|
"픽 제출 시 입력한 이메일로 챌린지에 참여됩니다. 같은 이메일의 모든 경기 포인트가 합산되어 누적 순위가 매겨집니다.",
|
||||||
|
rulesCloseBtn: "확인",
|
||||||
crowdSub: "| 참여자들의 선택",
|
crowdSub: "| 참여자들의 선택",
|
||||||
finalResult: "최종 결과",
|
finalResult: "최종 결과",
|
||||||
hit: "적중 ✓",
|
hit: "적중 ✓",
|
||||||
|
|
@ -191,6 +210,16 @@ export const DICT: Record<Lang, Dict> = {
|
||||||
copied: "Copied ✓",
|
copied: "Copied ✓",
|
||||||
goldDesc: "Earn points each match by nailing the result & score — the overall #1 wins ₩1,000,000.",
|
goldDesc: "Earn points each match by nailing the result & score — the overall #1 wins ₩1,000,000.",
|
||||||
goldBtn: "Go for\n₩1,000,000",
|
goldBtn: "Go for\n₩1,000,000",
|
||||||
|
rulesTitle: "₩1,000,000 Challenge Rules",
|
||||||
|
rulesCumulative: "Earn points each match — the player with the highest cumulative total wins ₩1,000,000.",
|
||||||
|
rulesExact: "Exact score",
|
||||||
|
rulesCloseGrade: "Close (result + goal difference)",
|
||||||
|
rulesOutcome: "Correct result only",
|
||||||
|
rulesPartial: "Partial (one team's score)",
|
||||||
|
rulesMiss: "Miss",
|
||||||
|
rulesEmailRequired:
|
||||||
|
"You enter the challenge with the email you provide when submitting a pick. Points from all matches under the same email are summed for the overall ranking.",
|
||||||
|
rulesCloseBtn: "Got it",
|
||||||
crowdSub: "| What the crowd picked",
|
crowdSub: "| What the crowd picked",
|
||||||
finalResult: "Final result",
|
finalResult: "Final result",
|
||||||
hit: "Hit ✓",
|
hit: "Hit ✓",
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue