content: import React, { Component } from 'react';
  import { BrowserRouter } from 'react-router-dom';
  
  import Header from './components/common/Header';
  import Footer from './components/common/Footer'
  import GuestHome from './components/auth/Home'
  import Wraper from './components/common/LogedWraper'
  import './App.css';
  
  class App extends Component {
    constructor(props) {
      super(props)
      this.state = {
        token: '',
        username: ''
      }
    }
  
    componentDidMount() {
      if (localStorage.getItem('token')) {
        this.setState({ token: localStorage.getItem('token') })
      }
      if (localStorage.getItem('username')) {
        this.setState({ username: localStorage.getItem('username') })
      }
    }
  
    render() {
      return (
        <BrowserRouter>
          <div>
            <Header username={this.state.username !== ''? "Hello " + this.state.username : "Hello Guest"}/>
            {this.state.token === '' ? <GuestHome /> : <Wraper />}
            <Footer />
          </div>
        </BrowserRouter>
      );
    }
  }
  
  export default App;
  