feat: add match game detail analytics
This commit is contained in:
1 parent
c6da2013bd
commit
7b5604873e
18 files changed
+3452
-46
No files matched your search
@@ -1963,16 +1963,15 @@ function MatchResultPanel({ match }: { match: MatchDetailView }) {
|
||||
<div className="mt-5 border border-base-content/8 divide-y divide-base-content/8">
|
||||
{gameNumbers.map((gameNumber) => {
|
||||
const game = gamesByNumber.get(gameNumber);
|
||||
return (
|
||||
<div
|
||||
key={gameNumber}
|
||||
className="grid grid-cols-[56px_1fr_auto] gap-3 items-center px-3 py-2.5 text-xs"
|
||||
>
|
||||
const rowClass =
|
||||
"grid grid-cols-[56px_1fr_auto] gap-3 items-center px-3 py-2.5 text-xs";
|
||||
const content = (
|
||||
<>
|
||||
<span className="text-base-content/35 font-bold">
|
||||
{gameNumber}경기
|
||||
</span>
|
||||
{game ? (
|
||||
<div>
|
||||
<div className="min-w-0">
|
||||
<span
|
||||
className={`font-black ${resultSideClass(game.winnerSide)}`}
|
||||
>
|
||||
@@ -1988,9 +1987,40 @@ function MatchResultPanel({ match }: { match: MatchDetailView }) {
|
||||
) : (
|
||||
<span className="text-base-content/25">대기 중</span>
|
||||
)}
|
||||
<span className="text-base-content/35 font-mono">
|
||||
{game ? formatGameDuration(game.gameDuration) : "-"}
|
||||
<span className="text-right text-base-content/35 font-mono">
|
||||
{game ? (
|
||||
<>
|
||||
{formatGameDuration(game.gameDuration)}
|
||||
<span className="ml-2 font-sans font-bold text-primary opacity-0 transition-opacity group-hover:opacity-100">
|
||||
상세
|
||||
</span>
|
||||
</>
|
||||
) : (
|
||||
"-"
|
||||
)}
|
||||
</span>
|
||||
</>
|
||||
);
|
||||
|
||||
if (game) {
|
||||
return (
|
||||
<Link
|
||||
key={gameNumber}
|
||||
to={`/match/${match.id}/game/${gameNumber}`}
|
||||
className={`${rowClass} group transition-colors hover:bg-primary/5`}
|
||||
aria-label={`${gameNumber}경기 상세 보기`}
|
||||
>
|
||||
{content}
|
||||
</Link>
|
||||
);
|
||||
}
|
||||
|
||||
return (
|
||||
<div
|
||||
key={gameNumber}
|
||||
className={rowClass}
|
||||
>
|
||||
{content}
|
||||
</div>
|
||||
);
|
||||
})}
|
||||
|
||||
File diff suppressed because it is too large.
Load diff
Reference in new issue
Block a user