調整歷史戰績彈窗顯示文字

This commit is contained in:
2026-04-16 07:48:15 +08:00
parent 7965c234df
commit e903d3ae52
2 changed files with 26 additions and 23 deletions

View File

@@ -50,7 +50,7 @@ export function HistoryPage() {
<p className="panel-kicker">History</p>
<h2></h2>
<p className="panel-copy">
DB `history`
DB `history`
</p>
</article>
@@ -149,8 +149,8 @@ function HistoryReplayModal({ item, onClose }: HistoryReplayModalProps) {
item.scoreList.map(([round, starter, winCount, winner]) => (
<div className="history-replay-row" key={`${item.id}-${round}`}>
<span> {round + 1} </span>
<span> #{starter + 1}</span>
<span> {winCount + 1}</span>
<span>{getStarterName(item, starter)}</span>
<span> {winCount + 1}</span>
<strong>{winner === 0 ? item.leftTeamName : item.rightTeamName}</strong>
</div>
))
@@ -160,3 +160,7 @@ function HistoryReplayModal({ item, onClose }: HistoryReplayModalProps) {
</div>
)
}
function getStarterName(item: HistoryListItem, starter: number) {
return item.players[starter] ?? '未知玩家'
}