응원가를 MLB 로 확장 (MLS 제외)

- MLB 라인업: Stats API schedule→gamePk→boxscore battingOrder (양팀 9명 = 발표)
- 작사 프롬프트 리그 분기 (MLB 는 한국 팬 표기 지시)
- /api/songs/today league 미지정 시 전 리그 반환, 프론트는 전 리그 조회
- 상세 페이지 응원가 버튼 KBO+MLB 노출

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
JinwooKimandClaude Fable 5 committed 2026-08-25 10:05:27 +09:00
1 parent 0fc7598d88
commit dbd08e62c7
5 files changed
+102 -28

No files matched your search

+2 -2
View File
@@ -160,7 +160,7 @@ export default function MatchupHUD({ match, lang = "ko" }: { match: Match; lang?
<div className="mt-5 grid grid-cols-[1fr_auto_1fr] items-center gap-3">
<div className="flex flex-col items-center gap-2.5">
<TeamFlag team={left} className={flagCls} />
{match.league === "kbo" && (
{isBaseball && (
<CheerSongButton matchId={match.matchId} teamCode={left.code} lang={lang} />
)}
</div>
@@ -183,7 +183,7 @@ export default function MatchupHUD({ match, lang = "ko" }: { match: Match; lang?
</div>
<div className="flex flex-col items-center gap-2.5">
<TeamFlag team={right} className={flagCls} />
{match.league === "kbo" && (
{isBaseball && (
<CheerSongButton matchId={match.matchId} teamCode={right.code} lang={lang} />
)}
</div>
+2 -2
View File
@@ -60,8 +60,8 @@ export interface SongOut {
tracks: SongTrackOut[];
}
export function getTodaySongs(league = "kbo"): Promise<SongOut[]> {
return http<SongOut[]>(`/songs/today?league=${league}`);
export function getTodaySongs(league = ""): Promise<SongOut[]> {
return http<SongOut[]>(`/songs/today${league ? `?league=${league}` : ""}`);
}
export function listMatches(lang: Lang, league = ""): Promise<Match[]> {
+1 -1
View File
@@ -57,7 +57,7 @@ function fetchSongsCached(): Promise<SongOut[]> {
const day = todayKstKey();
if (!songsPromise || songsDay !== day) {
songsDay = day;
songsPromise = getTodaySongs("kbo").catch(() => []);
songsPromise = getTodaySongs().catch(() => []); // 전 리그(kbo+mlb)
}
return songsPromise;
}