diff --git a/src/containers/reviewImages/index.tsx b/src/containers/reviewImages/index.tsx index ddf7314b..3e41b6aa 100644 --- a/src/containers/reviewImages/index.tsx +++ b/src/containers/reviewImages/index.tsx @@ -148,10 +148,19 @@ const ReviewImages: React.FC = () => { toApprove.push(protectedApiClient.approveImage(id)); }); setFetchSiteImagesState(LoadingState.LOADING); - Promise.all(toApprove).then(() => { - onClickSearch(); - setSelectedImageIds([]); - }); + Promise.all(toApprove) + .then(() => { + onClickSearch(); + setSelectedImageIds([]); + message.success(t('review_images.message.approve_success')); + }) + .catch((err) => { + message.error( + t('review_images.message.approve_error', { + error: err.response.data, + }), + ); + }); } async function onClickReject() { @@ -165,10 +174,19 @@ const ReviewImages: React.FC = () => { ); }); setFetchSiteImagesState(LoadingState.LOADING); - Promise.all(toReject).then(() => { - onClickSearch(); - setSelectedImageIds([]); - }); + Promise.all(toReject) + .then(() => { + onClickSearch(); + setSelectedImageIds([]); + message.success(t('review_images.message.reject_success')); + }) + .catch((err) => { + message.error( + t('review_images.message.reject_error', { + error: err.response.data, + }), + ); + }); } return ( diff --git a/src/i18n/en/admin.json b/src/i18n/en/admin.json index 30bbee87..54866401 100644 --- a/src/i18n/en/admin.json +++ b/src/i18n/en/admin.json @@ -80,7 +80,7 @@ "message": { "search_error": "Cannot access images", "approve_success": "Successfully approved image(s)!", - "reject_sucess": "Successfully rejected images(s)!", + "reject_success": "Successfully rejected images(s)!", "approve_error": "Error approving image(s): {{error}}", "reject_error": "Error rejecting image(s): {{error}}" }