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]);
|
}, [readyState]);
|
||||||
|
|
||||||
|
if (readyState != ReadyState.OPEN)
|
||||||
|
return <></>;
|
||||||
|
|
||||||
return <div className="Controls flex-row">
|
return <div className="Controls flex-row">
|
||||||
<div className="flex-column Controls-Container">
|
<div className="flex-column Controls-Container">
|
||||||
<h3>Move</h3>
|
<h3>Move</h3>
|
||||||
|
|
|
@ -36,6 +36,9 @@ export default function MapChooser() {
|
||||||
postMap.mutate(chosenMap);
|
postMap.mutate(chosenMap);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
if (query.isError)
|
||||||
|
return <></>;
|
||||||
|
|
||||||
const disabled = !query.isSuccess || postMap.isPending;
|
const disabled = !query.isSuccess || postMap.isPending;
|
||||||
|
|
||||||
return <select className="MapChooser-DropDown" onChange={onChange} disabled={disabled}>
|
return <select className="MapChooser-DropDown" onChange={onChange} disabled={disabled}>
|
||||||
|
|
|
@ -57,7 +57,7 @@ export default function PlayerInfo({player}: { player: string }) {
|
||||||
sendMessage('');
|
sendMessage('');
|
||||||
}, [readyState, shouldSendMessage]);
|
}, [readyState, shouldSendMessage]);
|
||||||
|
|
||||||
if (!lastJsonMessage)
|
if (!lastJsonMessage || readyState !== ReadyState.OPEN)
|
||||||
return <></>;
|
return <></>;
|
||||||
|
|
||||||
return <Column className="PlayerInfo">
|
return <Column className="PlayerInfo">
|
||||||
|
|
Loading…
Reference in a new issue