1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-26 07:22:34 +00:00

Repo optimized (#2664)

This commit is contained in:
杨顺强
2018-12-18 17:21:01 +08:00
committed by Daniel Pan
parent 3b43d2d534
commit ed5439a4e3
15 changed files with 83 additions and 78 deletions

View File

@@ -7,7 +7,7 @@ const propTypes = {
dirent: PropTypes.object.isRequired,
menuPosition: PropTypes.object.isRequired,
onMenuItemClick: PropTypes.func.isRequired,
currentRepo: PropTypes.object.isRequired,
currentRepoInfo: PropTypes.object.isRequired,
isRepoOwner: PropTypes.bool.isRequired,
};
@@ -21,8 +21,8 @@ class DirentMenu extends React.Component {
}
componentDidMount() {
let repo = this.props.currentRepo;
let menuList = this.calculateMenuList(repo);
let repoInfo = this.props.currentRepoInfo;
let menuList = this.calculateMenuList(repoInfo);
this.setState({
menuList: menuList,
menuHeight: menuList.length * 30,