//Modules
import React from "react";
import {
  BrowserRouter as Router,
  Switch,
  Route,
  Link
} from "react-router-dom";

//Components
import { DefaultLayout } from '../';

//Main routes
import { 
        HomePage,
        InternSearch,
        CompanyProfile,
        UserProfile,
        ContactPage,
      } from '../';

//Sub routes

class GlobalRouter extends React.Component {
    constructor(props) {
      super(props)
      this.state = {
        errorlog: [],
        clear: 'clear'
        
    }
    }


    render() {
      
      return ( 
              <Router>
                  <DefaultLayout>
                    <Switch>
                        <Route exact path="/" component={HomePage} />
                        <Route path="/zoeken" component={InternSearch} />
                        <Route path="/bedrijfsprofiel" component={CompanyProfile} />
                        <Route path="/gebruikersprofiel" component={UserProfile} />
                        <Route path="/contact" component={ContactPage} />
                    </Switch> 
                </DefaultLayout>
              </Router>     
        );
    }

  }

  export default GlobalRouter;