import React , { Component } from 'react'; import {Route,Switch} from 'react-router-dom'; import { SnackbarHOC } from 'educoder'; import { CNotificationHOC } from '../modules/courses/common/CNotificationHOC'; import './css/index.css'; import Loadable from 'react-loadable'; import Loading from '../Loading'; const ProjectNew = Loadable({ loader: () => import('./New/Index'), loading: Loading, }) const ProjectIndex = Loadable({ loader: () => import('./Main/Index'), loading: Loading, }) const ProjectDetail = Loadable({ loader: () => import('./Main/Detail'), loading: Loading, }) class Index extends Component{ constructor(props){ super(props); this.state={ current_user:undefined } } componentDidMount=()=>{ let current_user={ user_id:50207, login:'caicc' } this.setState({ current_user }) } render(){ const {current_user} = this.state; return( () } > () } > () } > ) } } export default CNotificationHOC() ( SnackbarHOC() ( Index ));