feat: connect tournament views to APIs and recover archived stats
Remove development previews and complete hall of fame, match history, official results, and multi-kill API integration. Fix active match pagination and team-ready controls, preserve basic scoreboards, and recover statistics when Riot archives arrive. Use bounded in-process cache invalidation retries and add the Riot match lookup index migration with regression coverage.
This commit is contained in:
1 parent
20e1e6ec04
commit
0d7617e2d2
70 files changed
+3739
-1793
No files matched your search
@@ -1,4 +1,4 @@
|
||||
import type { MatchDetailResponse } from '@lolympus/contracts';
|
||||
import type { MatchDetailResponse, MatchEventStage } from '@lolympus/contracts';
|
||||
|
||||
const scheduleFormatter = new Intl.DateTimeFormat('ko-KR', {
|
||||
timeZone: 'Asia/Seoul',
|
||||
@@ -10,16 +10,25 @@ const scheduleFormatter = new Intl.DateTimeFormat('ko-KR', {
|
||||
hourCycle: 'h23',
|
||||
});
|
||||
|
||||
export const HOME_MATCH_STATUS = {
|
||||
const MATCH_STAGE_LABEL: Record<MatchEventStage, string> = {
|
||||
recruiting: '모집 중',
|
||||
'team-built': '팀빌딩',
|
||||
auction: '경매 중',
|
||||
'team-ready': '팀 편성 완료',
|
||||
'team-check': '팀빌딩 상태 확인 필요',
|
||||
'in-progress': '진행 중',
|
||||
finished: '종료',
|
||||
} as const;
|
||||
};
|
||||
|
||||
export function getMatchStageLabel(
|
||||
match: Pick<MatchDetailResponse, 'status' | 'eventProgress'>,
|
||||
) {
|
||||
return MATCH_STAGE_LABEL[match.eventProgress?.stage ??
|
||||
(match.status === 'team-built' ? 'team-check' : match.status)];
|
||||
}
|
||||
|
||||
type HomeMatchEnrollment = Pick<
|
||||
MatchDetailResponse,
|
||||
'status' | 'joined' | 'participants' | 'maxParticipants'
|
||||
'status' | 'eventProgress' | 'joined' | 'participants' | 'maxParticipants'
|
||||
>;
|
||||
|
||||
export function getHomeMatchSchedule(scheduledAt: string) {
|
||||
@@ -92,8 +101,7 @@ export function getNextMatchBanner(
|
||||
const regularTitle = /^(?:[월화수목금토일]요일\s*(?:정기\s*)?|정기\s*)내전$/u;
|
||||
const title = regularTitle.test(match.title.trim()) ? '정기 내전' : match.title;
|
||||
|
||||
let status: string = HOME_MATCH_STATUS[match.status];
|
||||
if (match.status === 'team-built') status = '팀 편성';
|
||||
let status = getMatchStageLabel(match);
|
||||
if (match.status === 'recruiting') {
|
||||
if (match.joined) status = '신청 완료';
|
||||
else if (!canApply) status = match.maxParticipants > 0 ? '정원 마감' : '모집 마감';
|
||||
|
||||
Reference in new issue
Block a user