/默认跳转地址

This commit is contained in:
caishi 2021-07-06 13:59:54 +08:00
parent 7da0c7f6ab
commit 3b31b5c47b
2 changed files with 15 additions and 12 deletions

View File

@ -203,14 +203,6 @@ class App extends Component {
}>
</Route>
{/*项目*/}
<Route
path={"/projects"}
render={
(props) => {
return (<Projects {...this.props} {...props} {...this.state} />)
}
}>
</Route>
<Route
path="/register"
render={
@ -239,13 +231,18 @@ class App extends Component {
return (<InfosIndex {...this.props} {...this.state} />)
}
}></Route>
<Route
path={"/projects"}
render={
(props) => {
return (<Projects {...this.props} {...props} {...this.state} />)
}
}>
</Route>
<Route exact path="/"
render={
(props) => (
personal && personal.length > 0 ?
<InfosIndex {...this.props} {...props} />
:
<ProjectIndex {...this.props} {...props} />
<Projects {...this.props} {...props} {...this.state} />
)
}
/>

View File

@ -61,6 +61,12 @@ class Index extends Component {
<ProjectIndex {...this.props} {...props} />
)}
></Route>
<Route
path="/"
render={(props) => (
<ProjectIndex {...this.props} {...props} />
)}
></Route>
</Switch>
</div>
);