This commit is contained in:
zwjamnsss 2017-07-17 19:27:20 +08:00
parent 29783a98f7
commit ecaba6585f
3 changed files with 3 additions and 4 deletions

View File

@ -39,7 +39,7 @@ export default class GroupList extends Component {
componentWillMount() {
this.props.fetchGroupList().then(() => {
const currGroup = this.props.groupList[0];
const currGroup = this.props.groupList[0] || { group_name: '' };
this.props.setCurrGroup(currGroup)
});
}

View File

@ -5,7 +5,7 @@ import {
const initialState = {
groupList: [],
currGroup: 'MFE'
currGroup: { group_name: '' }
};
export default (state = initialState, action) => {

View File

@ -14,11 +14,10 @@ export default () => {
<Route path="/" component={ Home } exact />
<Route path="/ProjectGroups" component={ ProjectGroups } />
<Route path="/Interface" component={ Interface } />
<Route path="/user" component={User} />
<Route path="/user" component={User} />
<Route path="/News" component={ News } />
</div>
</HashRouter>
)
}