diff options
author | hmhealey <harrisonmhealey@gmail.com> | 2015-11-13 12:20:33 -0500 |
---|---|---|
committer | hmhealey <harrisonmhealey@gmail.com> | 2015-11-18 08:50:49 -0500 |
commit | a4267471a57c95dd99e17ee5e9fcc95892970764 (patch) | |
tree | 0db5c19e03609cbce3f70e20c7fe45a10f640d18 /web/react/stores/modal_store.jsx | |
parent | 7b01528d17c61a762ded17a23ccd9a2a728910a0 (diff) | |
download | chat-a4267471a57c95dd99e17ee5e9fcc95892970764.tar.gz chat-a4267471a57c95dd99e17ee5e9fcc95892970764.tar.bz2 chat-a4267471a57c95dd99e17ee5e9fcc95892970764.zip |
Converted DeletePostModal to React-Bootstrap
Diffstat (limited to 'web/react/stores/modal_store.jsx')
-rw-r--r-- | web/react/stores/modal_store.jsx | 8 |
1 files changed, 5 insertions, 3 deletions
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; } } |