make broken connections more obvious by removing controls
This commit is contained in:
parent
d9e9c28976
commit
cd12ab7bde
|
@ -58,6 +58,9 @@ export default function Controls({player}: { player: string }) {
|
|||
};
|
||||
}, [readyState]);
|
||||
|
||||
if (readyState != ReadyState.OPEN)
|
||||
return <></>;
|
||||
|
||||
return <div className="Controls flex-row">
|
||||
<div className="flex-column Controls-Container">
|
||||
<h3>Move</h3>
|
||||
|
|
|
@ -36,6 +36,9 @@ export default function MapChooser() {
|
|||
postMap.mutate(chosenMap);
|
||||
};
|
||||
|
||||
if (query.isError)
|
||||
return <></>;
|
||||
|
||||
const disabled = !query.isSuccess || postMap.isPending;
|
||||
|
||||
return <select className="MapChooser-DropDown" onChange={onChange} disabled={disabled}>
|
||||
|
|
|
@ -57,7 +57,7 @@ export default function PlayerInfo({player}: { player: string }) {
|
|||
sendMessage('');
|
||||
}, [readyState, shouldSendMessage]);
|
||||
|
||||
if (!lastJsonMessage)
|
||||
if (!lastJsonMessage || readyState !== ReadyState.OPEN)
|
||||
return <></>;
|
||||
|
||||
return <Column className="PlayerInfo">
|
||||
|
|
Loading…
Reference in a new issue