mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-08 10:22:46 +00:00
optimization code
This commit is contained in:
@@ -413,18 +413,7 @@ class DirentListItem extends React.Component {
|
||||
return '';
|
||||
}
|
||||
|
||||
let isShowShareBtn = false;
|
||||
if (this.props.showShareBtn) {
|
||||
if (canGenerateShareLink) {
|
||||
isShowShareBtn = true;
|
||||
} else {
|
||||
if (dirent.type === 'dir') {
|
||||
isShowShareBtn = true;
|
||||
} else {
|
||||
isShowShareBtn = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
let isShowShareBtn = (dirent.type === 'dir' && this.props.isShowShareBtn) || canGenerateShareLink;
|
||||
|
||||
return (
|
||||
<Fragment>
|
||||
|
Reference in New Issue
Block a user