sr admin confirm delete

This commit is contained in:
Kalle (Sendou)
2020-12-19 20:33:29 +02:00
parent eb7aa9fb95
commit 38b24e60c5

View File

@@ -124,7 +124,15 @@ const SalmonRunAdminPage = ({}) => {
</TableCell>
<TableCell>
<Button
onClick={() => handleClick("DELETE", record.id)}
onClick={() => {
if (
window.confirm(
`Delete record on ${record.rotation.stage} with ${record.goldenEggCount} eggs permanently?`
)
) {
handleClick("DELETE", record.id);
}
}}
colorScheme="red"
disabled={sending}
size="sm"