import React from 'react';
import {BrowserRouter, Route, Link, Switch} from 'react-router-dom';
import {hot} from 'react-hot-loader/root';

import ApplicationLayout from './components/layout/application_layout';

import Pokemon from './components/pages/pokemon';
import NotFound from './components/pages/not_found';
import TestComponent from './components/test_component';

import './assets/stylesheets/app.scss';

class App extends React.Component {
  render() {
    return (
      <BrowserRouter>
        <ApplicationLayout>
          <Switch>
            <Route exact path="/" component={TestComponent} />
            <Route path="/pokemon" component={Pokemon} />

            <Route component={NotFound} />
          </Switch>

          <p>
            <Link to="/pokemon">Show me the pokemon!</Link>
          </p>
        </ApplicationLayout>
      </BrowserRouter>
    );
  }
}

export default hot(App);
