Browse Source

implemented userlist, remove debug class from roomlist

master
ritfsaecdaq 6 years ago
parent
commit
8b2337cfee
2 changed files with 13 additions and 2 deletions
  1. +0
    -1
      googletrendsgame/src/components/RoomList.js
  2. +13
    -1
      googletrendsgame/src/components/UserList.js

+ 0
- 1
googletrendsgame/src/components/RoomList.js View File

@ -4,7 +4,6 @@ import {modifyStateToCreateRoom} from '../App'
export default (props) => {
let rooms = props.roomArray;
console.log(rooms);
if (rooms.length != 0) {
let roomsList = rooms.map((room) =>
<RoomListItem roomName={room.name} private={room.passwordBool} capacity={room.capacity} occupancy={room.occupants} />

+ 13
- 1
googletrendsgame/src/components/UserList.js View File

@ -1,3 +1,15 @@
import React from 'react';
import User from './User'
function
export default (props) => {
var users = props.users;
var userList = users.map((user) =>
<User name={user.name} score={user.score} word={user.word}>
);
return(
<div>
<ol> {userList} </ol>
</div>
);
}

Loading…
Cancel
Save