import React, { Component } from "react";
import { Router, Route } from "react-router-dom";
import { observer } from "mobx-react";
import Navbar from "./component/Navbar";
import routes from "./router";
import history from './router/history'
@observer
class App extends Component {
    render() {
        return (
            <div className="App">
                <Router history={history}>
                    <Navbar />
                    {routes.map(route => (
                        <Route
                            key={route.path}
                            exact={route.exact}
                            path={route.path}
                            render={route.render}
                        />
                    ))}
                </Router>
            </div>
        );
    }
    componentDidMount() {
    }
}

export default App;
