import React from 'react';
import { Route, Switch } from "react-router-dom";
import Loadable from "react-loadable";
import Loading from "../../Loading";
import { withRouter } from "react-router";
import { SnackbarHOC } from "educoder";
import { CNotificationHOC } from "../../modules/courses/common/CNotificationHOC";
import { TPMIndexHOC } from "../../modules/tpm/TPMIndexHOC";
import Handbook from '../Component/Handbook';
const Infos = Loadable({
  loader: () => import("./Infos"),
  loading: Loading,
});
export default withRouter(
  (CNotificationHOC()(SnackbarHOC()(TPMIndexHOC((props)=>{
    return(
      <div>
        <Handbook />
        <Switch>
          <Route
            path="/users/:username"
            render={() => (
              <Infos {...props} />
            )}
          ></Route>
        </Switch>
      </div>
    )
  }))))
)