// GroupSubs: a list of group subscribers currently online. // Show in the topic title bar import React from 'react'; import { FormattedMessage } from 'react-intl'; import { MAX_ONLINE_IN_TOPIC } from '../config.js' import LetterTile from './letter-tile.jsx'; import { makeImageUrl } from '../lib/blob-helpers.js'; export default class GroupSubs extends React.Component { constructor(props) { super(props); } render() { const usersOnline = []; const totalCount = (this.props.subscribers || []).length; const countToShow = Math.min(MAX_ONLINE_IN_TOPIC, totalCount); (this.props.subscribers || []).some((sub) => { usersOnline.push(
); return usersOnline.length == countToShow; }); return (
{usersOnline} {totalCount > countToShow ? : null}
); } };