//@flow import { Icon } from '@blueprintjs/core' import { List } from 'immutable'; import * as React from 'react'; import { Flex } from 'reflexbox'; import { ApiPlayer } from '../../api/model'; import { RadialList } from './radial-list/RadialList'; import roundTable from './round-table.png'; type RadialPlayerListProps = { players: List }; const PlayerItem = ({player}) => (
{player.displayName}
); const PlayerPlaceholder = () => (
?
); const UserIcon = ({isUser, isOwner, title}) => { const icon = isOwner ? 'badge' : 'user'; const intent = isUser ? 'warning' : 'none'; return ; }; export const RadialPlayerList = ({players}: RadialPlayerListProps) => { const orderedPlayers = placeUserFirst(players.toArray()); const playerItems = orderedPlayers.map(player => ); const tableImg = Round table; return ; }; function placeUserFirst(players: Array): Array { while (!players[0].user) { players.push(players.shift()); } return players; } function completeWithPlaceholders(playerItems: Array): Array { while (playerItems.length < 3) { playerItems.push(); } return playerItems; }