응원가 공유·플레이어 문구 '오늘의' → 제작일 표기 (예: 8월 28일 OO 응원가)

songs API에 dateKst(경기일) 추가, OG 공유 제목·프론트 shareText·artist에 적용
— 매일 갱신되는 콘텐츠임을 드러낸다

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
JinwooKimandClaude Fable 5 committed 2026-08-31 10:21:24 +09:00
1 parent df367070ce
commit bb930cc59f
4 files changed
+18 -6

No files matched your search

+2
View File
@@ -57,6 +57,8 @@ export interface SongOut {
teamName: string;
title: string;
lyrics?: string;
/** 제작일(경기일 KST, YYYY-MM-DD) — "8월 28일 OO 응원가" 표기용 */
dateKst?: string | null;
tracks: SongTrackOut[];
}
+7 -3
View File
@@ -42,14 +42,18 @@ function fetchMatchSongsCached(matchId: string): Promise<SongOut[]> {
function songToTracks(s: SongOut): Track[] {
const base = s.title || `${s.teamName} 응원가`;
// 공유는 응원가 전용 링크 — 크롤러에 "오늘의 OO 응원가" OG 카드가 나간다
// 제작일 표기 ("8월 28일") — 매일 갱신되는 콘텐츠임을 드러낸다. 날짜 없으면 "오늘의"
const day = s.dateKst
? `${Number(s.dateKst.slice(5, 7))}월 ${Number(s.dateKst.slice(8, 10))}일`
: "오늘의";
// 공유는 응원가 전용 링크 — 크롤러에 "8월 28일 OO 응원가" OG 카드가 나간다
const shareUrl = `${window.location.origin}/song/${s.matchId}/${s.teamCode}`;
const shareText = `오늘의 ${s.teamName} 응원가 「${base}」 — TriplePick`;
const shareText = `${day} ${s.teamName} 응원가 「${base}」 — TriplePick`;
return (s.tracks || [])
.filter((t) => t.audioUrl)
.map((t, i) => ({
title: s.tracks.length > 1 ? `${base} #${i + 1}` : base,
artist: `오늘의 ${s.teamName} 응원가`,
artist: `${day} ${s.teamName} 응원가`,
src: t.audioUrl,
cover: t.imageUrl,
lyrics: s.lyrics || undefined,