import React, { Component } from 'react';
import './WebSocketStatus.scss';
class WebSocketStatus extends Component {
render() {
if(this.props.wsIsOpen && !this.props.wsIsAuthenticated)
return (
Authenticating against {this.props.wsURI}
);
if(this.props.wsIsRecovering)
return (
Reconnecting to {this.props.wsURI}
);
if(this.props.wsIsOpen)
return (
Receiving real time updates from {this.props.wsURI}
);
return null;
}
}
export default WebSocketStatus;