// Copyright (c) 2015 Mattermost, Inc. All Rights Reserved. // See License.txt for license information. import * as Utils from '../utils/utils.jsx'; const Modal = ReactBootstrap.Modal; export default class ChannelInfoModal extends React.Component { render() { let channel = this.props.channel; if (!channel) { channel = { display_name: 'No Channel Found', name: 'No Channel Found', purpose: 'No Channel Found', id: 'No Channel Found' }; } const channelURL = Utils.getShortenedTeamURL() + channel.name; return ( {channel.display_name}
{'Channel Name:'}
{channel.display_name}
{'Channel URL:'}
{channelURL}
{'Channel ID:'}
{channel.id}
{'Channel Purpose:'}
{channel.purpose}
); } } ChannelInfoModal.propTypes = { show: React.PropTypes.bool.isRequired, onHide: React.PropTypes.func.isRequired, channel: React.PropTypes.object.isRequired };