From d5b800f59050ad2180ba70c306f398334926e8d4 Mon Sep 17 00:00:00 2001 From: riley Date: Thu, 27 Apr 2017 11:17:53 -0600 Subject: [PATCH] add accepted rejected aciton buttons --- client/coral-admin/src/components/ActionButton.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/client/coral-admin/src/components/ActionButton.js b/client/coral-admin/src/components/ActionButton.js index 1fcafeac0..ae75b829e 100644 --- a/client/coral-admin/src/components/ActionButton.js +++ b/client/coral-admin/src/components/ActionButton.js @@ -6,6 +6,13 @@ import {menuActionsMap} from '../containers/ModerationQueue/helpers/moderationQu const ActionButton = ({type = '', status, ...props}) => { const typeName = type.toLowerCase(); const active = ((type === 'REJECT' && status === 'REJECTED') || (type === 'APPROVE' && status === 'ACCEPTED')); + let text = menuActionsMap[type].text; + + if (text === 'Approve' && active) { + text = 'Approved'; + } else if (text === 'Reject' && active) { + text = 'Rejected'; + } return ( + >{text} ); };