fix lobby

This commit is contained in:
ntr 2019-06-11 22:32:01 +10:00
parent d28748f217
commit e0f0634c74

View File

@ -120,9 +120,10 @@ function Nav(args) {
const joined = instances.map(i => { const joined = instances.map(i => {
const score = i.players.find(p => p.id === account.id); const score = i.players.find(p => p.id === account.id);
const phase = i.rounds[i.rounds.length - 1].game_id const phase = i.phase === 'Lobby'
? 'In game' ? 'Lobby' : i.rounds[i.rounds.length - 1].game_id
: 'Vbox'; ? 'In game'
: 'Vbox';
return <button key={i.id} onClick={() => joinInstance(i)} >{`${phase} ${score.wins} / ${score.losses}`}</button> return <button key={i.id} onClick={() => joinInstance(i)} >{`${phase} ${score.wins} / ${score.losses}`}</button>
}); });