forked from Gitlink/forgeplus-react
新增一个首页,不要默认跳转到个人中心
This commit is contained in:
parent
9811276a7c
commit
48a6b9ac4f
|
@ -75,6 +75,10 @@ const EducoderLogin = Loadable({
|
|||
loading: Loading,
|
||||
})
|
||||
|
||||
const Index = Loadable({
|
||||
loader: () => import('./forge/Jupyter/Index'),
|
||||
loading: Loading,
|
||||
})
|
||||
class App extends Component {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
|
@ -263,7 +267,7 @@ class App extends Component {
|
|||
<Route exact path="/"
|
||||
render={
|
||||
(props) => (
|
||||
<Projects {...this.props} {...props} {...this.state}></Projects>
|
||||
<Index {...this.props} {...props} {...this.state}></Index>
|
||||
)
|
||||
}
|
||||
/>
|
||||
|
|
|
@ -67,7 +67,7 @@ class Index extends Component {
|
|||
<ProjectIndex {...this.props} {...props} />
|
||||
)}
|
||||
></Route>
|
||||
<Route
|
||||
{/* <Route
|
||||
exact
|
||||
path="/"
|
||||
render={(props) => (
|
||||
|
@ -76,7 +76,7 @@ class Index extends Component {
|
|||
:
|
||||
<ProjectIndex {...this.props} {...props} />
|
||||
)}
|
||||
></Route>
|
||||
></Route> */}
|
||||
</Switch>
|
||||
</div>
|
||||
);
|
||||
|
|
|
@ -0,0 +1,11 @@
|
|||
import React from 'react';
|
||||
import { CNotificationHOC } from "../../modules/courses/common/CNotificationHOC";
|
||||
import { TPMIndexHOC } from "../../modules/tpm/TPMIndexHOC";
|
||||
import { SnackbarHOC } from "educoder";
|
||||
|
||||
function Index(props){
|
||||
return(
|
||||
<div>iniiiiiiiiiiiiiiii</div>
|
||||
)
|
||||
}
|
||||
export default CNotificationHOC()(SnackbarHOC()(TPMIndexHOC(Index)));
|
|
@ -96,7 +96,7 @@ body>.-task-title {
|
|||
}
|
||||
|
||||
.newContainer {
|
||||
background: #f5f5f5;
|
||||
background: #fff;
|
||||
}
|
||||
|
||||
.ant-modal-title {
|
||||
|
|
|
@ -165,9 +165,9 @@ export function TPMIndexHOC(WrappedComponent) {
|
|||
this.setState({
|
||||
tpmLoading: false
|
||||
})
|
||||
if (this.props.match.path === "/" && response.data.login) {
|
||||
this.props.history.push(`/users/${response.data.login}`);
|
||||
}
|
||||
// if (this.props.match.path === "/" && response.data.login) {
|
||||
// this.props.history.push(`/users/${response.data.login}`);
|
||||
// }
|
||||
if(response.data && response.data.login){
|
||||
if(response.data.need_edit_info){
|
||||
this.setState({
|
||||
|
|
Loading…
Reference in New Issue