From 22156373e059d8180620922d4f7655a9ca61dad8 Mon Sep 17 00:00:00 2001 From: James Ketrenos Date: Thu, 3 Feb 2022 12:00:51 -0800 Subject: [PATCH] Move QUIT to an action instead of in the active player list Signed-off-by: James Ketrenos --- client/src/Table.js | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/client/src/Table.js b/client/src/Table.js index 06fde2c..5761ec1 100755 --- a/client/src/Table.js +++ b/client/src/Table.js @@ -283,14 +283,19 @@ const Action = ({ table }) => { const passClick = (event) => { } + const quitClick = (event) => { + table.setSelected(""); + } + if (!table.game) { console.log("Why no game?"); return (); } + const inLobby = table.game.state === 'lobby'; return ( - { table.game.state === 'lobby' && <> + { inLobby && <> } @@ -300,6 +305,9 @@ const Action = ({ table }) => { } + { !inLobby && + + } ); } @@ -384,9 +392,6 @@ const Players = ({ table }) => { { item.status + ' ' } { item.status !== 'Not active' && Date.now() ? Date.now() : item.lastActive}/>} )} /> - { !inLobby && table.game.color === color && - - } )); }