From e8f6dd2f3359feceeae9923366c5ec80a6ab1d73 Mon Sep 17 00:00:00 2001
From: hmhealey
Date: Tue, 17 Nov 2015 09:17:00 -0500
Subject: Cleaned up how channel intro messages display set channel header
button
---
web/react/utils/channel_intro_mssages.jsx | 45 ++++++++++++-------------------
1 file changed, 17 insertions(+), 28 deletions(-)
(limited to 'web/react/utils')
diff --git a/web/react/utils/channel_intro_mssages.jsx b/web/react/utils/channel_intro_mssages.jsx
index 268e4f695..72328f812 100644
--- a/web/react/utils/channel_intro_mssages.jsx
+++ b/web/react/utils/channel_intro_mssages.jsx
@@ -3,6 +3,7 @@
import * as Utils from './utils.jsx';
import EditChannelHeaderModal from '../components/edit_channel_header_modal.jsx';
+import GetTeamInviteLinkModal from '../components/get_team_invite_link_modal.jsx';
import InviteMemberModal from '../components/invite_member_modal.jsx';
import ToggleModalButton from '../components/toggle_modal_button.jsx';
import UserProfile from '../components/user_profile.jsx';
@@ -50,13 +51,7 @@ export function createDMIntroMessage(channel) {
{'This is the start of your direct message history with ' + teammateName + '.'}
{'Direct messages and files shared here are not shown to people outside this area.'}
-
- {'Set a header'}
-
+ {createSetHeaderButton(channel)}
);
}
@@ -76,13 +71,7 @@ export function createOffTopicIntroMessage(channel, showInviteModal) {
{'This is the start of ' + channel.display_name + ', a channel for non-work-related conversations.'}
-
- {'Set a header'}
-
+ {createSetHeaderButton(channel)}
{inviteModalLink}
-
- {'Set a header'}
-
+ {createSetHeaderButton(channel)}
);
@@ -182,13 +165,7 @@ export function createStandardIntroMessage(channel, showInviteModal) {
{memberMessage}
-
- {'Set a header'}
-
+ {createSetHeaderButton(channel)}
);
}
+
+function createSetHeaderButton(channel) {
+ return (
+
+ {'Set a header'}
+
+ );
+}
--
cgit v1.2.3-1-g7c22