instance list

This commit is contained in:
ntr
2019-04-02 12:26:25 +11:00
parent 9f2114f3a0
commit eb85155605
2 changed files with 24 additions and 12 deletions
@@ -8,20 +8,21 @@ function instanceList({ instances, setActiveInstance, sendInstanceJoin }) {
const instanceJoin = (
<button
className="instance-btn right"
className="instance-btn full right"
onClick={() => sendInstanceJoin()}>
Join New Instance
</button>
);
const instancePanels = instances.map(instance => {
const name = instance.instance === NULL_UUID
? 'Normal Mode'
const globalInstance = instance.instance === NULL_UUID;
const name = globalInstance
? 'Global Matchmaking'
: `${instance.instance.substring(0, 5)}`;
return (
<button
className="instance-btn right"
className={`instance-btn right ${globalInstance ? 'full' : ''}`}
key={instance.id}
onClick={() => setActiveInstance(instance)}>
{name}