release/86 #2

Merged
dahyeon merged 108 commits from release/86 into main 2026-07-15 08:56:05 +00:00
6 changed files with 68 additions and 7 deletions
Showing only changes of commit 51ea9c42d3 - Show all commits

No files matched your search

+4
View File
@@ -170,6 +170,10 @@ function App() {
path="/communities/:cid/internal-stats/match/:matchId"
element={<InternalMatchDetailPage />}
/>
<Route
path="/communities/:cid/internal-stats/match/:matchId/game/:gameNumber"
element={<MatchGameDetailPage />}
/>
<Route
path="/admin/communities/:cid/matches"
element={<MatchAdminPage />}
+11
View File
@@ -0,0 +1,11 @@
export function internalMatchDetailPath(communityId: string, matchId: string) {
return `/communities/${communityId}/internal-stats/match/${matchId}`;
}
export function internalMatchGamePath(
communityId: string,
matchId: string,
gameNumber: string | number,
) {
return `${internalMatchDetailPath(communityId, matchId)}/game/${gameNumber}`;
}
+6 -1
View File
@@ -50,6 +50,7 @@ import {
teamIndexColorClasses,
teamIndexLabel,
} from "../lib/league";
import { internalMatchGamePath } from "../lib/internal-match-routes";
import { formatRankDetail, RankBadge } from "../components/RankBadge";
import type {
ApiAuction,
@@ -780,7 +781,11 @@ function InternalRecentMatchRow({
const resultTone = match.win ? "text-blue-400" : "text-red-400";
const detailPath =
match.internalMatchId && match.gameNumber
? `/match/${match.internalMatchId}/game/${match.gameNumber}`
? internalMatchGamePath(
DEFAULT_COMMUNITY_ID,
match.internalMatchId,
match.gameNumber,
)
: null;
const content = (
<>
+19 -1
View File
@@ -12,6 +12,7 @@ import {
teamIndexColorClasses,
teamIndexLabel,
} from "../lib/league";
import { internalMatchGamePath } from "../lib/internal-match-routes";
import { LANE_LABELS } from "../lib/riot-history";
function formatDateTime(value: string | number) {
@@ -89,9 +90,13 @@ function ItemStrip({
}
function GamePanel({
communityId,
matchId,
game,
manifest,
}: {
communityId: string;
matchId: string;
game: ApiInternalMatchDetailResponse["games"][number];
manifest: ReturnType<typeof useDdragonManifest>["data"];
}) {
@@ -112,6 +117,13 @@ function GamePanel({
</p>
</div>
<div className="flex gap-2">
<Link
to={internalMatchGamePath(communityId, matchId, game.gameNumber)}
state={{ backTo: historyBackTo }}
className="border border-primary/20 px-2 py-1 text-xs font-black text-primary transition-colors hover:bg-primary/8"
>
상세 분석
</Link>
{game.teams.map((team) => (
<span
key={team.side}
@@ -316,7 +328,13 @@ export default function InternalMatchDetailPage() {
<div className="space-y-4">
{detail.games.map((game) => (
<GamePanel key={game.riotMatchId} game={game} manifest={ddragon} />
<GamePanel
key={game.riotMatchId}
communityId={communityId}
matchId={detail.match.matchId}
game={game}
manifest={ddragon}
/>
))}
</div>
</main>
+6 -1
View File
@@ -45,6 +45,7 @@ import {
teamIndexColorClasses,
teamIndexLabel,
} from "../lib/league";
import { internalMatchGamePath } from "../lib/internal-match-routes";
import type {
AuctionTopTierThreshold,
ApiCommunityUserSearchCandidate,
@@ -2237,7 +2238,11 @@ function MatchGameListSection({ match }: { match: MatchDetailView }) {
return (
<Link
key={gameNumber}
to={`/match/${match.id}/game/${gameNumber}`}
to={internalMatchGamePath(
DEFAULT_COMMUNITY_ID,
match.id,
gameNumber,
)}
className={`${rowClass} group transition-colors hover:bg-primary/5 focus-visible:bg-primary/8 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-primary`}
aria-label={`${gameNumber}경기 ${resolveMatchTeamName(match, game.blueTeamIndex)} 대 ${resolveMatchTeamName(match, game.redTeamIndex)} 상세 보기`}
>
+22 -4
View File
@@ -28,6 +28,10 @@ import {
teamIndexColorClasses,
teamIndexLabel,
} from "../lib/league";
import {
internalMatchDetailPath,
internalMatchGamePath,
} from "../lib/internal-match-routes";
import { LANE_LABELS } from "../lib/riot-history";
type MatchGameDetail = ApiInternalMatchDetailResponse["games"][number];
@@ -1971,10 +1975,12 @@ function GameAnalysisPanel({
function GameTabs({
detail,
communityId,
currentGameNumber,
navigationState,
}: {
detail: ApiInternalMatchDetailResponse;
communityId: string;
currentGameNumber: number;
navigationState: MatchGameNavigationState | undefined;
}) {
@@ -1989,7 +1995,11 @@ function GameTabs({
return (
<Link
key={game.gameNumber}
to={`/match/${detail.match.matchId}/game/${game.gameNumber}`}
to={internalMatchGamePath(
communityId,
detail.match.matchId,
game.gameNumber,
)}
state={navigationState}
className={`min-w-[8rem] border-r border-base-content/8 px-4 py-3 text-xs transition-colors last:border-r-0 ${
active
@@ -2012,11 +2022,13 @@ function GameTabs({
function MatchScoreHero({
detail,
communityId,
selectedGame,
backTarget,
navigationState,
}: {
detail: ApiInternalMatchDetailResponse;
communityId: string;
selectedGame: MatchGameDetail;
backTarget: MatchGameBackTarget;
navigationState: MatchGameNavigationState | undefined;
@@ -2097,6 +2109,7 @@ function MatchScoreHero({
</div>
<GameTabs
detail={detail}
communityId={communityId}
currentGameNumber={selectedGame.gameNumber}
navigationState={navigationState}
/>
@@ -2105,14 +2118,18 @@ function MatchScoreHero({
}
export default function MatchGameDetailPage() {
const { id, gameNumber } = useParams();
const { cid, matchId, id, gameNumber } = useParams();
const location = useLocation();
const [activeTab, setActiveTab] = useState<DetailTab>("scoreboard");
const communityId = cid ?? DEFAULT_COMMUNITY_ID;
const resolvedMatchId = matchId ?? id;
const requestedGameNumber = Number(gameNumber);
const detailQuery = useInternalMatchDetail(id, DEFAULT_COMMUNITY_ID);
const detailQuery = useInternalMatchDetail(resolvedMatchId, communityId);
const { data: ddragon } = useDdragonManifest();
const detail = detailQuery.data;
const fallbackBackTo = `/match/${id ?? ""}`;
const fallbackBackTo = resolvedMatchId
? internalMatchDetailPath(communityId, resolvedMatchId)
: `/communities/${communityId}/internal-stats`;
const backTarget = resolveBackTarget(location.state, fallbackBackTo);
const navigationState = createNavigationState(backTarget, fallbackBackTo);
@@ -2157,6 +2174,7 @@ export default function MatchGameDetailPage() {
<main className="mx-auto max-w-6xl px-4 py-6 sm:px-6">
<MatchScoreHero
detail={detail}
communityId={communityId}
selectedGame={selectedGame}
backTarget={backTarget}
navigationState={navigationState}