import React, { Component } from "react"; import Navigation from "./Navigation"; import Main from "./Main"; import Login from "./Login"; import { getIsAuthenticated } from "../modules/login"; import { connect } from "react-redux"; import { withRouter } from "react-router-dom"; type Props = { login: boolean, username: string, getAuthState: any }; class App extends Component { componentWillMount() { this.props.getAuthState(); } render() { const { login, username } = this.props.login; if (!login) { return (