fix: 继续修复group bug

This commit is contained in:
qitmac000249 2017-07-25 16:18:00 +08:00
parent 1f6603f70e
commit cbbe26296c
2 changed files with 3 additions and 2 deletions

View File

@ -47,7 +47,7 @@ export default class App extends Component {
<Header />
<Route path="/" component={Home} exact />
<Route path="/group" component={ ProjectGroups } >
<Route exact={false} path="/group/:groupName" component={ ProjectGroups } />
<Route exact path="/group/:groupName" component={ ProjectGroups } />
</Route>
<Route path="/Interface" component={requireAuthentication(Interface)} />
<Route path="/user" component={requireAuthentication(User)} />

View File

@ -68,8 +68,9 @@ export default class GroupList extends Component {
this.props.history.replace(`${currGroup.group_name}`);
}
}
console.log(groupName);
}else if(!groupName && this.props.groupList.length){
this.props.history.replace(`group/${this.props.groupList[0].group_name}`);
this.props.history.push(`/group/${this.props.groupList[0].group_name}`);
}
console.log(currGroup);
this.setState({groupList: this.props.groupList});