fix: connection status

This commit is contained in:
cha0s 2019-04-17 00:50:25 -05:00
parent 5f932db5f6
commit fdd176644a

View File

@ -42,6 +42,7 @@ const ConnectionComponent = ({
const [isConnected, setIsConnected] = useState(false); const [isConnected, setIsConnected] = useState(false);
// Juggle connected state. // Juggle connected state.
useEffect(() => { useEffect(() => {
setIsConnected(socket.isConnected);
const onConnect = () => { const onConnect = () => {
setIsConnected(true); setIsConnected(true);
}; };