diff --git a/packages/pl-fe/src/modals/block-mute-modal.tsx b/packages/pl-fe/src/modals/block-mute-modal.tsx index 329e845ee..81d688617 100644 --- a/packages/pl-fe/src/modals/block-mute-modal.tsx +++ b/packages/pl-fe/src/modals/block-mute-modal.tsx @@ -50,7 +50,7 @@ const BlockMuteModal: React.FC = ({ accoun if (!account) return null; - const handleClick = () => { + const handleClick = (callback?: () => void) => { setIsSubmitting(true); const params: MuteAccountParams | BlockAccountParams = { duration: duration || undefined }; if (action === 'MUTE') { @@ -60,6 +60,7 @@ const BlockMuteModal: React.FC = ({ accoun onSuccess: () => { setIsSubmitting(false); onClose('BLOCK_MUTE'); + if (callback) callback(); }, }); if (notes && note !== undefined && note !== currentNote) { @@ -70,8 +71,7 @@ const BlockMuteModal: React.FC = ({ accoun }; const handleBlockAndReport = () => { - handleClick(); - dispatch(initReport(ReportableEntities.STATUS, account, { statusId })); + handleClick(() => dispatch(initReport(ReportableEntities.STATUS, account, { statusId }))); }; const handleCancel = () => {