From 388dc6c89c62133c3c5fd1c3bb5ec0327cf5be6d Mon Sep 17 00:00:00 2001 From: hmhealey Date: Mon, 23 Nov 2015 10:52:52 -0500 Subject: Moved show static methods out of modals and into EventHelpers --- web/react/dispatcher/event_helpers.jsx | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) (limited to 'web/react/dispatcher') diff --git a/web/react/dispatcher/event_helpers.jsx b/web/react/dispatcher/event_helpers.jsx index 85329b38f..d7f255aaa 100644 --- a/web/react/dispatcher/event_helpers.jsx +++ b/web/react/dispatcher/event_helpers.jsx @@ -81,3 +81,26 @@ export function emitPostDeletedEvent(post) { post }); } + +export function showDeletePostModal(post, commentCount = 0) { + AppDispatcher.handleViewAction({ + type: ActionTypes.TOGGLE_DELETE_POST_MODAL, + value: true, + post, + commentCount + }); +} + +export function showGetTeamInviteLinkModal() { + AppDispatcher.handleViewAction({ + type: Constants.ActionTypes.TOGGLE_GET_TEAM_INVITE_LINK_MODAL, + value: true + }); +} + +export function showInviteMemberModal() { + AppDispatcher.handleViewAction({ + type: ActionTypes.TOGGLE_INVITE_MEMBER_MODAL, + value: true + }); +} -- cgit v1.2.3-1-g7c22