mirror of
https://github.com/bitsocialnet/5chan.git
synced 2026-08-03 07:41:04 +02:00
add confirmation for mod queue approve/reject actions
This commit is contained in:
@@ -118,6 +118,12 @@ const ModQueueRow = ({ comment, isOdd = false }: ModQueueRowProps) => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
const handleApprove = async () => {
|
const handleApprove = async () => {
|
||||||
|
// Double confirmation for approve action
|
||||||
|
const confirm = window.confirm(t('double_confirm'));
|
||||||
|
if (!confirm) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
setInitiatedAction('approve');
|
setInitiatedAction('approve');
|
||||||
try {
|
try {
|
||||||
await approve();
|
await approve();
|
||||||
@@ -127,6 +133,12 @@ const ModQueueRow = ({ comment, isOdd = false }: ModQueueRowProps) => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const handleReject = async () => {
|
const handleReject = async () => {
|
||||||
|
// Double confirmation for reject action
|
||||||
|
const confirm = window.confirm(t('double_confirm'));
|
||||||
|
if (!confirm) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
setInitiatedAction('reject');
|
setInitiatedAction('reject');
|
||||||
try {
|
try {
|
||||||
await reject();
|
await reject();
|
||||||
|
|||||||
Reference in New Issue
Block a user