import React, { Component } from 'react'; import { connect } from 'react-redux'; import PropTypes from 'prop-types'; import classnames from 'classnames'; import * as stateActions from '../redux/stateActions'; class HiddenPeers extends Component { constructor(props) { super(props); this.state = { className: '' }; } componentDidUpdate(prevProps) { const { hiddenPeersCount } = this.props; if (hiddenPeersCount !== prevProps.hiddenPeersCount) { // eslint-disable-next-line react/no-did-update-set-state this.setState({ className: 'pulse' }, () => { if (this.timeout) { clearTimeout(this.timeout); } this.timeout = setTimeout(() => { this.setState({ className: '' }); }, 1000); }); } } render() { const { hiddenPeersCount, openUsersTab } = this.props; return (
+{hiddenPeersCount}
participant
{(hiddenPeersCount === 1) ? null : 's'}