diff --git a/apps/web/src/pages/HomePage.tsx b/apps/web/src/pages/HomePage.tsx index d13c7145..76e70548 100644 --- a/apps/web/src/pages/HomePage.tsx +++ b/apps/web/src/pages/HomePage.tsx @@ -25,9 +25,7 @@ import { EmptyNote, ErrorNote, LoadingNote, - Panel, PanelHeader, - Pill, PlainPage, Skeleton, pageWidthClass, @@ -45,6 +43,9 @@ const MATCH_ARCHIVE_PAGE_SIZE = 10; const HOME_HISTORY_LIMIT = 4; const HOME_RANKING_LIMIT = 5; const DEFAULT_MAP_ID = 11; +const SCHEDULE_LIST_CLASS = 'divide-y divide-line border-y border-line'; +const SCHEDULE_ROW_CLASS = + 'grid grid-cols-[minmax(0,1fr)_auto] gap-x-3 gap-y-2 px-2 py-3.5 md:grid-cols-[7.5rem_minmax(0,1fr)_auto] md:items-center md:gap-4'; const RANKING_COLUMNS_CLASS = 'grid grid-cols-[1.5rem_minmax(0,1fr)_3rem] items-center gap-3 px-3'; /** 순위 카드의 슬라이드 순서. undefined는 종합 순위. */ @@ -128,60 +129,129 @@ function NextMatch({ match }: { match: MatchDetailResponse }) { function UpcomingMatches({ matches, title = '이어지는 내전', + actions, footer, }: { matches: MatchDetailResponse[]; title?: string; + actions?: ReactNode; footer?: ReactNode; }) { return ( - - - ); } @@ -335,67 +358,26 @@ function HistoryRecords({ match, title: getHistoryMatchTitle(match.title, schedule), href: `/match/${match._id}`, - schedule: schedule?.compact ?? '일정 미정', map: match.mapId === DEFAULT_MAP_ID ? undefined : mapIdToLabel(match.mapId), }; }); return ( - <> -
- - - - {rows.map(({ match, title, href, schedule, map }) => ( - - - - - - - ))} - -
- - - - {title} - - {map &&

{map}

} -
- - - {match.participants.length}명 -
-
- - + ); } @@ -772,6 +754,7 @@ function RankingPreview({ statsPath }: { statsPath: string }) { } interface MatchPaginationProps { + label: string; page: number; pageCount: number; total: number; @@ -781,6 +764,7 @@ interface MatchPaginationProps { } function MatchPagination({ + label, page, pageCount, total, @@ -789,7 +773,7 @@ function MatchPagination({ onNext, }: MatchPaginationProps) { return ( -
+
- + ); } @@ -893,9 +877,8 @@ export default function HomePage({ eventType }: { eventType?: MatchEventType }) const hasHistoryError = Boolean(historyMatchesQuery.error) && !historyMatchesQuery.data; const statsPath = `/communities/${DEFAULT_COMMUNITY_ID}/internal-stats`; - const HistorySection = showArchive ? Panel : 'section'; const UpcomingStatusHeading = showArchive ? 'p' : 'h1'; - const contentSpacing = showArchive ? 'space-y-5 pb-16' : 'space-y-8 pb-10 md:pb-16'; + const contentSpacing = 'space-y-8 pb-10 md:pb-16'; const contentTopPadding = bannerMatch ? 'pt-10 md:pt-16' : 'pt-5 sm:pt-6'; const content = ( @@ -909,17 +892,27 @@ export default function HomePage({ eventType }: { eventType?: MatchEventType }) void activeMatchesQuery.refetch()} />} /> ) : activeMatchesQuery.isPlaceholderData ? ( - - +
+ - +
) : activeMatchesQuery.data && (activeMatchesQuery.data.matches.length > 0 || activePage > 1) ? ( + 전체 일정 +