import React, { Component } from 'react'; import PropTypes from 'prop-types'; import { connect } from 'react-redux'; import classnames from 'classnames'; import Peer from './Peer'; class Filmstrip extends Component { state = { selectedPeerName : null }; handleSelectPeer = (selectedPeerName) => { this.setState((oldState) => ({ selectedPeerName : oldState.selectedPeerName === selectedPeerName ? null : selectedPeerName })); }; render() { const { activeSpeakerName, peers, advancedMode } = this.props; // Find the name of the peer which is currently speaking. This is either // the latest active speaker, or the manually selected peer. const activePeerName = this.state.selectedPeerName || activeSpeakerName; return (