diff --git a/README.md b/README.md index 86d8f7f..7859c5b 100644 --- a/README.md +++ b/README.md @@ -38,6 +38,7 @@ - 點擊任一筆可開啟得分紀錄彈窗 - 彈窗右上角提供 `X` 關閉按鈕,手機更容易操作 - 每筆資料可單獨刪除 + - 刪除前會進行二次確認,降低誤刪風險 ## 本機開發 diff --git a/src/pages/HistoryPage.tsx b/src/pages/HistoryPage.tsx index b26a4a7..56ad01d 100644 --- a/src/pages/HistoryPage.tsx +++ b/src/pages/HistoryPage.tsx @@ -53,6 +53,14 @@ export function HistoryPage() { return } + const confirmedAgain = window.confirm( + `請再次確認要刪除這筆戰績:\n${item.leftTeamName} vs ${item.rightTeamName}`, + ) + + if (!confirmedAgain) { + return + } + setDeletingId(item.id) setError('')