import React, { PureComponent } from 'react'; import { List } from 'immutable'; import Navicon from '../containers/Navicon'; import { linkify } from '../util'; export default class ChatTitle extends PureComponent { render() { const { title, tab, channel, onToggleSearch, onToggleUserList, onCloseClick } = this.props; let closeTitle; if (tab.isChannel()) { closeTitle = 'Leave'; } else if (tab.name) { closeTitle = 'Close'; } else { closeTitle = 'Disconnect'; } return (
{title}
{linkify(channel.get('topic')) || null}
{channel.get('users', List()).size}
); } }