summaryrefslogtreecommitdiff
path: root/frontend
diff options
context:
space:
mode:
authorJoffrey Bion <joffrey.bion@amadeus.com>2018-06-12 11:02:33 +0200
committerJoffrey Bion <joffrey.bion@amadeus.com>2018-07-05 10:33:19 +0200
commit8cac0638070c0b09f8da527d03618c374f3095d8 (patch)
treedacb439e02645275921843d2cc0448cb637987c8 /frontend
parentUpgrade gradle wrapper to 4.8.1 (diff)
downloadseven-wonders-8cac0638070c0b09f8da527d03618c374f3095d8.tar.gz
seven-wonders-8cac0638070c0b09f8da527d03618c374f3095d8.tar.bz2
seven-wonders-8cac0638070c0b09f8da527d03618c374f3095d8.zip
Add title for player placeholders
Diffstat (limited to 'frontend')
-rw-r--r--frontend/src/components/lobby/RadialPlayerList.jsx7
1 files changed, 3 insertions, 4 deletions
diff --git a/frontend/src/components/lobby/RadialPlayerList.jsx b/frontend/src/components/lobby/RadialPlayerList.jsx
index 911c0d91..8345b48c 100644
--- a/frontend/src/components/lobby/RadialPlayerList.jsx
+++ b/frontend/src/components/lobby/RadialPlayerList.jsx
@@ -15,21 +15,20 @@ type RadialPlayerListProps = {
const PlayerItem = ({player, isOwner, isUser}) => (
<Flex column align='center'>
- <UserIcon isOwner={isOwner} isUser={isUser}/>
+ <UserIcon isOwner={isOwner} isUser={isUser} title={isOwner ? 'Game owner' : false}/>
<h5 style={{margin: 0}}>{player.displayName}</h5>
</Flex>
);
const PlayerPlaceholder = () => (
<Flex column align='center' style={{opacity: 0.3}}>
- <UserIcon isOwner={false} isUser={false}/>
+ <UserIcon isOwner={false} isUser={false} title='Waiting for player...'/>
<h5 style={{margin: 0}}>?</h5>
</Flex>
);
-const UserIcon = ({isUser, isOwner}) => {
+const UserIcon = ({isUser, isOwner, title}) => {
const icon = isOwner ? 'badge' : 'user';
- const title = isOwner ? 'Game owner' : false;
const intent = isUser ? 'warning' : 'none';
return <Icon icon={icon} iconSize={50} intent={intent} title={title}/>;
};
bgstack15