summaryrefslogtreecommitdiff
path: root/frontend/src/components/lobby/PlayerList.jsx
diff options
context:
space:
mode:
authorJoffrey BION <joffrey.bion@gmail.com>2019-05-05 20:38:49 +0200
committerjbion <joffrey.bion@amadeus.com>2019-05-06 18:33:15 +0200
commitfb32eee5caf331097e69d89af94767bbdca6abba (patch)
tree6a81d78f79889e80519f991ccd82844da401653c /frontend/src/components/lobby/PlayerList.jsx
parentMigrate radial-maths components to TypeScript (diff)
downloadseven-wonders-fb32eee5caf331097e69d89af94767bbdca6abba.tar.gz
seven-wonders-fb32eee5caf331097e69d89af94767bbdca6abba.tar.bz2
seven-wonders-fb32eee5caf331097e69d89af94767bbdca6abba.zip
Migrate lobby components to TypeScript
Diffstat (limited to 'frontend/src/components/lobby/PlayerList.jsx')
-rw-r--r--frontend/src/components/lobby/PlayerList.jsx36
1 files changed, 0 insertions, 36 deletions
diff --git a/frontend/src/components/lobby/PlayerList.jsx b/frontend/src/components/lobby/PlayerList.jsx
deleted file mode 100644
index 80212a3e..00000000
--- a/frontend/src/components/lobby/PlayerList.jsx
+++ /dev/null
@@ -1,36 +0,0 @@
-//@flow
-import { Classes, Icon } from '@blueprintjs/core'
-import { List } from 'immutable';
-import * as React from 'react';
-import { Flex } from 'reflexbox';
-import { ApiPlayer } from '../../api/model';
-
-type PlayerListProps = {
- players: List<ApiPlayer>,
- owner: string,
- currentPlayer: ApiPlayer,
-};
-
-const PlayerListItem = ({player, isOwner, isUser}) => (
- <tr>
- <td>
- <Flex align='center'>
- {isOwner && <Icon icon='badge' title='Game owner'/>}
- {isUser && <Icon icon='user' title='This is you'/>}
- </Flex>
- </td>
- <td>{player.displayName}</td>
- <td>{player.username}</td>
- </tr>
-);
-
-export const PlayerList = ({players, owner, currentPlayer}: PlayerListProps) => (
- <table className={Classes.HTML_TABLE}>
- <tbody>
- {players.map(player => <PlayerListItem key={player.username}
- player={player}
- isOwner={player.username === owner}
- isUser={player.username === currentPlayer.username}/>)}
- </tbody>
- </table>
-);
bgstack15