Skip to content

Instantly share code, notes, and snippets.

@RSpace
Last active January 3, 2016 10:57
Embed
What would you like to do?
MeetupVR - Members.js
class Members extends Component {
render () {
let members = this.props.members
if (this.props.vrMode) {
return (
<Entity>
{members.map(this.renderMember.bind(this))}
</Entity>
)
} else {
return (
<div className="members-container">
{members.map(this.renderMember.bind(this))}
</div>
)
}
}
renderMember (member, index) {
let position = circularPositionFromIndex(index, boxSize)
return (
<Member key={index} id={member.get('id')} name={member.get('name')} photoUrl={member.get('photo_url')}
type={member.get('type')}
width={boxSize} height={boxSize} depth={boxSize}
position={position}
index={index}
onClick={this.props.onAvatarClicked}
vrMode={this.props.vrMode} />
)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment