import { Peer, PeerControls, PeerList } from '@andyet/simplewebrtc'; import VolumeOffIcon from 'material-icons-svg/components/baseline/VolumeOff'; import VolumeUpIcon from 'material-icons-svg/components/baseline/VolumeUp'; import React from 'react'; import styled from 'styled-components'; import { TalkyButton } from '../styles/button'; const Button = styled(TalkyButton)({ marginRight: '5px' }); const Container = styled.ul({ listStyle: 'none', '& li': { marginBottom: '10px' } }); interface PeerListItemProps { peer: Peer; } // PeerListItem renders the displayName and mute controls for a peer. const PeerListItem: React.SFC = ({ peer }) => (
  • ( )} /> {peer.displayName || 'Anonymous'}
  • ); interface Props { roomAddress: string; } const Roster: React.SFC = ({ roomAddress }) => ( { return peers.length > 0 ? ( {peers.map(peer => ( ))} ) : ; }} /> ); export default Roster;