From fac3d26c2278cbc92a009352ed9a295f097d3b83 Mon Sep 17 00:00:00 2001 From: David Jay Date: Wed, 8 Mar 2017 16:39:53 -0500 Subject: [PATCH] Closing ban dialog after ban is complete. --- client/coral-admin/src/components/BanUserDialog.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/client/coral-admin/src/components/BanUserDialog.js b/client/coral-admin/src/components/BanUserDialog.js index f6a7227b8..4f2296409 100644 --- a/client/coral-admin/src/components/BanUserDialog.js +++ b/client/coral-admin/src/components/BanUserDialog.js @@ -8,9 +8,10 @@ import I18n from 'coral-framework/modules/i18n/i18n'; import translations from '../translations'; const lang = new I18n(translations); -const onBanClick = (userId, commentId, handleBanUser, rejectComment) => (e) => { +const onBanClick = (userId, commentId, handleBanUser, rejectComment, handleClose) => (e) => { e.preventDefault(); handleBanUser({userId}) + .then(handleClose) .then(() => rejectComment({commentId})); }; @@ -35,7 +36,7 @@ const BanUserDialog = ({open, handleClose, handleBanUser, rejectComment, user, c -