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:
@@ -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,
|
||||
|
Reference in New Issue
Block a user