新增一个首页,不要默认跳转到个人中心

This commit is contained in:
caishi 2021-04-09 11:07:55 +08:00
parent 9811276a7c
commit 48a6b9ac4f
5 changed files with 22 additions and 7 deletions

View File

@ -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>
)
}
/>

View File

@ -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>
);

View File

@ -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)));

View File

@ -96,7 +96,7 @@ body>.-task-title {
}
.newContainer {
background: #f5f5f5;
background: #fff;
}
.ant-modal-title {

View File

@ -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({