opti: 优化路由结构

This commit is contained in:
zwjamnsss 2017-08-11 10:58:15 +08:00
parent bb826f9a1c
commit d030c9fbaf
3 changed files with 3 additions and 6 deletions

2
.tags
View File

@ -460,4 +460,4 @@ constructor /Users/qitmac000445/Desktop/YAPI/yapi/client/Application.js /^ cons
state.login /Users/qitmac000445/Desktop/YAPI/yapi/client/Application.js /^ this.state = {$/;" property line:28
static.checkLoginState /Users/qitmac000445/Desktop/YAPI/yapi/client/Application.js /^ static propTypes = {$/;" property line:33
componentDidMount /Users/qitmac000445/Desktop/YAPI/yapi/client/Application.js /^ componentDidMount() {$/;" function line:45
render /Users/qitmac000445/Desktop/YAPI/yapi/client/Application.js /^ render() {$/;" function line:81
render /Users/qitmac000445/Desktop/YAPI/yapi/client/Application.js /^ render() {$/;" function line:78

2
.tags1
View File

@ -8,4 +8,4 @@ constructor /Users/qitmac000445/Desktop/YAPI/yapi/client/Application.js /^ cons
state.login /Users/qitmac000445/Desktop/YAPI/yapi/client/Application.js /^ this.state = {$/;" property line:28
static.checkLoginState /Users/qitmac000445/Desktop/YAPI/yapi/client/Application.js /^ static propTypes = {$/;" property line:33
componentDidMount /Users/qitmac000445/Desktop/YAPI/yapi/client/Application.js /^ componentDidMount() {$/;" function line:45
render /Users/qitmac000445/Desktop/YAPI/yapi/client/Application.js /^ render() {$/;" function line:81
render /Users/qitmac000445/Desktop/YAPI/yapi/client/Application.js /^ render() {$/;" function line:78

View File

@ -57,10 +57,7 @@ export default class App extends Component {
<Header />
<div className="router-container">
<Route path="/" component={Home} exact />
<Switch>
<Redirect exact from='/group' to='/group/1' />
<Route exact path="/group/:groupName" component={requireAuthentication(Group)} />
</Switch>
<Route path="/group/:id" component={requireAuthentication(Group)} />
<Route path="/project/:id" component={requireAuthentication(Project)} />
<Route path="/user" component={requireAuthentication(User)} />
<Route path="/follow" component={requireAuthentication(Follows)} />