mirror of
https://github.com/YMFE/yapi.git
synced 2025-02-23 13:59:28 +08:00
initsate
This commit is contained in:
parent
29783a98f7
commit
ecaba6585f
@ -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)
|
||||
});
|
||||
}
|
||||
|
@ -5,7 +5,7 @@ import {
|
||||
|
||||
const initialState = {
|
||||
groupList: [],
|
||||
currGroup: 'MFE'
|
||||
currGroup: { group_name: '' }
|
||||
};
|
||||
|
||||
export default (state = initialState, action) => {
|
||||
|
@ -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>
|
||||
)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user