補上歷史戰績刪除二次確認

This commit is contained in:
2026-04-16 17:22:23 +08:00
parent b2494fff17
commit d5fee1d299
2 changed files with 9 additions and 0 deletions

View File

@@ -38,6 +38,7 @@
- 點擊任一筆可開啟得分紀錄彈窗 - 點擊任一筆可開啟得分紀錄彈窗
- 彈窗右上角提供 `X` 關閉按鈕,手機更容易操作 - 彈窗右上角提供 `X` 關閉按鈕,手機更容易操作
- 每筆資料可單獨刪除 - 每筆資料可單獨刪除
- 刪除前會進行二次確認,降低誤刪風險
## 本機開發 ## 本機開發

View File

@@ -53,6 +53,14 @@ export function HistoryPage() {
return return
} }
const confirmedAgain = window.confirm(
`請再次確認要刪除這筆戰績:\n${item.leftTeamName} vs ${item.rightTeamName}`,
)
if (!confirmedAgain) {
return
}
setDeletingId(item.id) setDeletingId(item.id)
setError('') setError('')