forked from Gitlink/forgeplus-react
test
This commit is contained in:
parent
7817cc451f
commit
c310cbd231
18
src/App.js
18
src/App.js
|
|
@ -25,6 +25,7 @@ import { initAxiosInterceptors } from './AppConfig'
|
|||
import cookie from 'react-cookies';
|
||||
import InfosIndex from './forge/users/Index'
|
||||
import OrganizeIndex from './forge/Team/Index'
|
||||
import { connect } from 'react-redux';
|
||||
|
||||
window.marked = marked;
|
||||
const theme = createMuiTheme({
|
||||
|
|
@ -170,7 +171,7 @@ class App extends Component {
|
|||
mydisplay: false,
|
||||
occupation: 0,
|
||||
mygetHelmetapi: null,
|
||||
pathType: null,
|
||||
pathType: props.projectBase && props.projectBase.author && props.projectBase.author.type,
|
||||
pathName: null,
|
||||
}
|
||||
}
|
||||
|
|
@ -652,5 +653,18 @@ moment.defineLocale('zh-cn', {
|
|||
doy: 4 // The week that contains Jan 4th is the first week of the year.
|
||||
}
|
||||
});
|
||||
export default SnackbarHOC()(App);
|
||||
|
||||
|
||||
const mapStateToProps = (state) => {
|
||||
const {
|
||||
projectBase,
|
||||
} = state.projectReducer;
|
||||
return {
|
||||
projectBase,
|
||||
};
|
||||
}
|
||||
|
||||
export default connect(
|
||||
mapStateToProps,
|
||||
)(SnackbarHOC()(App));
|
||||
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@ import { withRouter } from "react-router";
|
|||
import { SnackbarHOC } from "educoder";
|
||||
import { CNotificationHOC } from "../../modules/courses/common/CNotificationHOC";
|
||||
import { TPMIndexHOC } from "../../modules/tpm/TPMIndexHOC";
|
||||
import ProjectDetail from '../Main/Detail'
|
||||
import '../css/index.scss';
|
||||
import './Index.scss';
|
||||
|
||||
|
|
@ -35,10 +36,10 @@ const SubDetailIndex = Loadable({
|
|||
loading: Loading,
|
||||
});
|
||||
// forge项目详情
|
||||
const ProjectDetail = Loadable({
|
||||
loader: () => import("../Main/Detail"),
|
||||
loading: Loading,
|
||||
});
|
||||
// const ProjectDetail = Loadable({
|
||||
// loader: () => import("../Main/Detail"),
|
||||
// loading: Loading,
|
||||
// });
|
||||
const team = CNotificationHOC()(SnackbarHOC()(TPMIndexHOC(
|
||||
((props)=>{
|
||||
return (
|
||||
|
|
|
|||
|
|
@ -6,15 +6,17 @@ import { withRouter } from "react-router";
|
|||
import { SnackbarHOC } from "educoder";
|
||||
import { CNotificationHOC } from "../../modules/courses/common/CNotificationHOC";
|
||||
import { TPMIndexHOC } from "../../modules/tpm/TPMIndexHOC";
|
||||
import ProjectDetail from '../Main/Detail'
|
||||
|
||||
const Infos = Loadable({
|
||||
loader: () => import("./Infos"),
|
||||
loading: Loading,
|
||||
});
|
||||
// forge项目详情
|
||||
const ProjectDetail = Loadable({
|
||||
loader: () => import("../Main/Detail"),
|
||||
loading: Loading,
|
||||
});
|
||||
// const ProjectDetail = Loadable({
|
||||
// loader: () => import("../Main/Detail"),
|
||||
// loading: Loading,
|
||||
// });
|
||||
|
||||
class DetailTop extends Component {
|
||||
constructor(props) {
|
||||
|
|
|
|||
|
|
@ -61,12 +61,13 @@ export function TPMIndexHOC(WrappedComponent) {
|
|||
window.removeEventListener('keyup', this.keyupListener)
|
||||
}
|
||||
componentWillMount() {
|
||||
this.setState({
|
||||
current_user: {}
|
||||
})
|
||||
if (!__SERVER__) {
|
||||
this.fetchUsers();
|
||||
} else {
|
||||
this.setState({
|
||||
current_user: {}
|
||||
})
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue