pushstate


  • administrators

    componentDidMount() {
    this.login();
    window.history.pushState(null, null, document.URL);
    window.addEventListener('popstate', this.onBack);
    //Ping the server every 31 minutes to see if the session is still alive
    this.interval = setInterval(
    () => this.sessionManager.ping(),
    SESSION_TIMEOUT
    );
    }

    componentWillUnmount() {
    clearInterval(this.interval);
    }

    onBack() {
    if (this.state.selectedNetwork) {
    this.onSelectNetwork(null);
    }
    window.history.pushState(null, null, document.URL);
    }