From e29342d4267c81a709cdc19fe992762ae468e0d9 Mon Sep 17 00:00:00 2001 From: hmhealey Date: Thu, 5 Nov 2015 13:32:06 -0500 Subject: Moved public and private channels into separate sections in the search autocomplete --- .../components/edit_channel_purpose_modal.jsx | 9 +-- web/react/components/search_autocomplete.jsx | 92 +++++++++++++++------- web/react/utils/utils.jsx | 9 +++ 3 files changed, 74 insertions(+), 36 deletions(-) (limited to 'web') diff --git a/web/react/components/edit_channel_purpose_modal.jsx b/web/react/components/edit_channel_purpose_modal.jsx index 4cb96a3ff..65e8183de 100644 --- a/web/react/components/edit_channel_purpose_modal.jsx +++ b/web/react/components/edit_channel_purpose_modal.jsx @@ -3,6 +3,8 @@ const AsyncClient = require('../utils/async_client.jsx'); const Client = require('../utils/client.jsx'); +const Utils = require('../utils/utils.jsx'); + const Modal = ReactBootstrap.Modal; export default class EditChannelPurposeModal extends React.Component { @@ -75,11 +77,6 @@ export default class EditChannelPurposeModal extends React.Component { title = {'Edit Purpose for '}{this.props.channel.display_name}; } - let channelTerm = 'Channel'; - if (this.props.channel.channelType === 'P') { - channelTerm = 'Group'; - } - return ( -

{`Describe how this ${channelTerm} should be used.`}

+

{`Describe how this ${Utils.getChannelTerm(this.props.channel.channelType)} should be used.`}