This commit is contained in:
caishi 2020-06-18 14:36:32 +08:00
commit 092de9828c
5 changed files with 9 additions and 12 deletions

View File

@ -245,7 +245,7 @@ class App extends Component {
(props) => {
return (<InfosIndex {...this.props} {...this.state} />)
}
}></Route>
}></Route>
<Route exact path="/"
render={
(props) => (

View File

@ -33,7 +33,9 @@ const Infos = Loadable({
});
class Index extends Component {
render() {
console.log("1",this.props);
return (
<div className="newMain clearfix">
<Switch {...this.props}>
@ -61,7 +63,7 @@ class Index extends Component {
path="/"
render={(props) => (
this.props.current_user && this.props.current_user.login ?
<Infos {...this.props} {...props} />
<Infos {...this.props} {...props} />
:
<ProjectIndex {...this.props} {...props} />
)}

View File

@ -13,12 +13,12 @@ const Infos = Loadable({
export default withRouter(
(CNotificationHOC()(SnackbarHOC()(TPMIndexHOC((props)=>{
return(
<Switch {...props}>
<Route
<Switch>
<Route
path="/users/:username"
render={(props) => {
return <Infos {...props} />;
}}
render={() => (
<Infos {...props} />
)}
></Route>
</Switch>
)

View File

@ -6,7 +6,6 @@ import FocusButton from "../UsersList/focus_button";
import axios from "axios";
import { getImageUrl } from "educoder";
import { Route, Switch } from "react-router-dom";
import { withRouter } from "react-router";
import "./new_user.css";
import "../css/index.css";
@ -14,7 +13,6 @@ import './Index.scss';
import Loadable from "react-loadable";
import Loading from "../../Loading";
import { ImageLayerOfCommentHOC } from "../../modules/page/layers/ImageLayerOfCommentHOC";
const InfosUser = Loadable({
loader: () => import("./InfosUser"),

View File

@ -24,10 +24,7 @@ const VideoProtocol = Loadable({
loader: () => import('./video/VideoProtocol'),
loading: Loading,
})
const $ = window.$;
class InfosIndex extends Component {
render() {
return (
<Switch {...this.props}>