summaryrefslogtreecommitdiff
path: root/frontend/src/components/PlayerList.jsx
diff options
context:
space:
mode:
Diffstat (limited to 'frontend/src/components/PlayerList.jsx')
-rw-r--r--frontend/src/components/PlayerList.jsx23
1 files changed, 23 insertions, 0 deletions
diff --git a/frontend/src/components/PlayerList.jsx b/frontend/src/components/PlayerList.jsx
new file mode 100644
index 00000000..8584502b
--- /dev/null
+++ b/frontend/src/components/PlayerList.jsx
@@ -0,0 +1,23 @@
+//@flow
+import { Text } from '@blueprintjs/core';
+import { List } from 'immutable';
+import React from 'react';
+import { Flex } from 'reflexbox';
+import { Player } from '../models/players';
+
+export type PlayerListProps = {
+ players: List<Player>;
+};
+
+const PlayerItem = ({player}) => (
+ <Flex>
+ <Text>{player.displayName}</Text>
+ <Text>({player.username})</Text>
+ </Flex>
+);
+
+export const PlayerList = ({players}: PlayerListProps) => (
+ <div>
+ {players.map(player => <PlayerItem key={player.username} player={player}/>)}
+ </div>
+);
bgstack15