mirror of
https://github.com/bitsocialnet/5chan.git
synced 2026-08-03 07:41:04 +02:00
fix(edit-menu): remove redundant double confirm for purge
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user