diff --git a/app/lib/components/ParticipantList/ListMe.jsx b/app/lib/components/ParticipantList/ListMe.jsx new file mode 100644 index 0000000..0c2ffcb --- /dev/null +++ b/app/lib/components/ParticipantList/ListMe.jsx @@ -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 ( +
  • +
    + + +
    + {me.displayName} +
    + +
    + {me.raisedHand && ( +
    + )} +
    +
    +
  • + ); +}; + +ListMe.propTypes = { + me : Me.isRequired +}; + +const mapStateToProps = (state) => ({ + me : state.me +}); + +export default connect( + mapStateToProps +)(ListMe); \ No newline at end of file diff --git a/app/lib/components/ParticipantList/ParticipantList.jsx b/app/lib/components/ParticipantList/ParticipantList.jsx index a212509..d2f727b 100644 --- a/app/lib/components/ParticipantList/ParticipantList.jsx +++ b/app/lib/components/ParticipantList/ParticipantList.jsx @@ -5,6 +5,7 @@ import * as requestActions from '../../redux/requestActions'; import * as stateActions from '../../redux/stateActions'; import PropTypes from 'prop-types'; import ListPeer from './ListPeer'; +import ListMe from './ListMe'; class ParticipantList extends React.Component { @@ -23,6 +24,8 @@ class ParticipantList extends React.Component return (