調整歷史戰績彈窗顯示文字
This commit is contained in:
@@ -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] ?? '未知玩家'
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user