Show Me in the users tab
parent
48ac6c8391
commit
9cdc14518c
|
|
@ -0,0 +1,38 @@
|
||||||
|
import React from 'react';
|
||||||
|
import { connect } from 'react-redux';
|
||||||
|
import { Me } from '../appPropTypes';
|
||||||
|
|
||||||
|
const ListMe = ({ me }) =>
|
||||||
|
{
|
||||||
|
const picture = me.picture || 'resources/images/avatar-empty.jpeg';
|
||||||
|
|
||||||
|
return (
|
||||||
|
<li className='list-item'>
|
||||||
|
<div data-component='ListPeer'>
|
||||||
|
<img className='avatar' src={picture} />
|
||||||
|
|
||||||
|
<div className='peer-info'>
|
||||||
|
{me.displayName}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div className='indicators'>
|
||||||
|
{me.raisedHand && (
|
||||||
|
<div className='icon raise-hand on' />
|
||||||
|
)}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
ListMe.propTypes = {
|
||||||
|
me : Me.isRequired
|
||||||
|
};
|
||||||
|
|
||||||
|
const mapStateToProps = (state) => ({
|
||||||
|
me : state.me
|
||||||
|
});
|
||||||
|
|
||||||
|
export default connect(
|
||||||
|
mapStateToProps
|
||||||
|
)(ListMe);
|
||||||
|
|
@ -5,6 +5,7 @@ import * as requestActions from '../../redux/requestActions';
|
||||||
import * as stateActions from '../../redux/stateActions';
|
import * as stateActions from '../../redux/stateActions';
|
||||||
import PropTypes from 'prop-types';
|
import PropTypes from 'prop-types';
|
||||||
import ListPeer from './ListPeer';
|
import ListPeer from './ListPeer';
|
||||||
|
import ListMe from './ListMe';
|
||||||
|
|
||||||
class ParticipantList extends React.Component
|
class ParticipantList extends React.Component
|
||||||
{
|
{
|
||||||
|
|
@ -23,6 +24,8 @@ class ParticipantList extends React.Component
|
||||||
return (
|
return (
|
||||||
<div data-component='ParticipantList'>
|
<div data-component='ParticipantList'>
|
||||||
<ul className='list'>
|
<ul className='list'>
|
||||||
|
<ListMe />
|
||||||
|
|
||||||
{
|
{
|
||||||
peers.map((peer) =>
|
peers.map((peer) =>
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue