한국 남아공 경기 공유 썸네일에 투표 픽 스코어 카드 생성

This commit is contained in:
JinwooKim committed 2026-06-23 14:19:31 +09:00
1 parent 16bd01fc95
commit 39766bae55
6 files changed
+151 -5

No files matched your search

+9 -2
View File
@@ -151,9 +151,16 @@ export default function Arena({
: `나는 ${me}. AI 셋과 다 다른 선택! 너는? — TriplePick`;
}, [outcome, scoreA, scoreB, matched, aShort, bShort, lang]);
// 공유 URL — 픽 스코어 썸네일은 한국-남아공 경기 전용. 그 경기만 쿼리를 붙인다.
const codes = [match.teamA.code, match.teamB.code];
const isKorRsa = codes.includes("KOR") && codes.includes("RSA");
const pickShareUrl = isKorRsa
? `${shareUrl}?sa=${scoreA}&sb=${scoreB}`
: shareUrl;
const copyLink = async () => {
try {
await navigator.clipboard.writeText(`${shareText}\n${shareUrl}`);
await navigator.clipboard.writeText(`${shareText}\n${pickShareUrl}`);
setCopied(true);
setTimeout(() => setCopied(false), 1800);
} catch {
@@ -166,7 +173,7 @@ export default function Arena({
await navigator.share({
title: `${leftShort} vs ${rightShort} — TriplePick`,
text: shareText,
url: shareUrl,
url: pickShareUrl,
});
} catch {
/* cancelled */