fix(edit-menu): remove redundant double confirm for purge

This commit is contained in:
plebeius
2026-03-03 15:51:20 +08:00
parent 422eacc5c1
commit 17afdc7502
+2 -7
View File
@@ -190,14 +190,9 @@ const EditMenu = ({ post }: { post: Comment }) => {
const onPurgeCheckbox = (e: React.ChangeEvent<HTMLInputElement>) => {
const { checked } = e.target;
// Double confirmation for purge action
if (checked) {
const firstConfirm = window.confirm(t('purge_confirm'));
if (!firstConfirm) {
return;
}
const secondConfirm = window.confirm(t('double_confirm'));
if (!secondConfirm) {
const confirmed = window.confirm(t('purge_confirm'));
if (!confirmed) {
return;
}
}