import React from 'react';
import { Route, Switch } from "react-router-dom";
import { withRouter } from "react-router";
import Loadable from "react-loadable";
import Loading from "../../Loading";
import { SnackbarHOC } from "educoder";
import { CNotificationHOC } from "../../modules/courses/common/CNotificationHOC";
import { TPMIndexHOC } from "../../modules/tpm/TPMIndexHOC";

// forge项目详情
const ProjectDetail = Loadable({
  loader: () => import("../Main/Detail"),
  loading: Loading,
});
export default withRouter(
  (CNotificationHOC()(SnackbarHOC()(TPMIndexHOC((props) => {
    return (
      <Switch>
        <Route
          path="/:owner/:projectsId"
          render={(p) => (
            <ProjectDetail  {...props} {...p} />
          )}
        ></Route>
      </Switch>
    )
  }))))
)