feat(ui): 100만원 챌린지 룰 설명 모달 추가
'100만 원에 도전하기' 버튼 클릭 시 모달 표시 — 배점표(정확5/근접3/승패2/부분1/빗나감0), 누적 1위 상금, 이메일 기준 참여·집계 안내. KO/EN 지원. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
1 parent
d8db7ed0f4
commit
51352c7c5c
2 files changed
+88
-1
No files matched your search
@@ -49,6 +49,7 @@ export default function Arena({
|
||||
const [copied, setCopied] = useState(false);
|
||||
const [submitting, setSubmitting] = useState(false);
|
||||
const [error, setError] = useState<string | null>(null);
|
||||
const [showRules, setShowRules] = useState(false);
|
||||
|
||||
// 점수 선택 시 승/무/패 자동 선택 (스코어가 결과의 소스)
|
||||
useEffect(() => {
|
||||
@@ -359,12 +360,69 @@ export default function Arena({
|
||||
{t.goldDesc}
|
||||
</p>
|
||||
</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}
|
||||
</button>
|
||||
</div>
|
||||
</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 승리 확률) ===== */}
|
||||
<section className="mt-6">
|
||||
<div className="mb-2.5 text-[20px] font-extrabold">
|
||||
|
||||
Reference in new issue
Block a user