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 onPurgeCheckbox = (e: React.ChangeEvent<HTMLInputElement>) => {
|
||||||
const { checked } = e.target;
|
const { checked } = e.target;
|
||||||
|
|
||||||
// Double confirmation for purge action
|
|
||||||
if (checked) {
|
if (checked) {
|
||||||
const firstConfirm = window.confirm(t('purge_confirm'));
|
const confirmed = window.confirm(t('purge_confirm'));
|
||||||
if (!firstConfirm) {
|
if (!confirmed) {
|
||||||
return;
|
|
||||||
}
|
|
||||||
const secondConfirm = window.confirm(t('double_confirm'));
|
|
||||||
if (!secondConfirm) {
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user