From a4267471a57c95dd99e17ee5e9fcc95892970764 Mon Sep 17 00:00:00 2001
From: hmhealey <harrisonmhealey@gmail.com>
Date: Fri, 13 Nov 2015 12:20:33 -0500
Subject: Converted DeletePostModal to React-Bootstrap

---
 web/react/stores/modal_store.jsx | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

(limited to 'web/react/stores/modal_store.jsx')

diff --git a/web/react/stores/modal_store.jsx b/web/react/stores/modal_store.jsx
index dc65d48da..809f83a59 100644
--- a/web/react/stores/modal_store.jsx
+++ b/web/react/stores/modal_store.jsx
@@ -27,12 +27,14 @@ class ModalStoreClass extends EventEmitter {
     }
 
     handleEventPayload(payload) {
-        const action = payload.action;
+        // toggle event handlers should accept a boolean show/hide value and can accept a map of arguments
+        const {type, value, ...args} = payload.action;
 
-        switch (action.type) {
+        switch (type) {
         case ActionTypes.TOGGLE_IMPORT_THEME_MODAL:
         case ActionTypes.TOGGLE_INVITE_MEMBER_MODAL:
-            this.emit(action.type, action.value);
+        case ActionTypes.TOGGLE_DELETE_POST_MODAL:
+            this.emit(type, value, args);
             break;
         }
     }
-- 
cgit v1.2.3-1-g7c22

