1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-02 15:38:15 +00:00

Optimized module code (#2574)

This commit is contained in:
杨顺强
2018-11-28 12:41:49 +08:00
committed by Daniel Pan
parent 330407be0b
commit 09f32f2312
21 changed files with 120 additions and 38 deletions

View File

@@ -6,6 +6,7 @@ import Notification from '../common/notification';
import Account from '../common/account';
const propTypes = {
repoID: PropTypes.string.isRequired,
onSearchedClick: PropTypes.func.isRequired,
searchPlaceholder: PropTypes.string
};
@@ -14,7 +15,13 @@ class CommonToolbar extends React.Component {
render() {
return (
<div className="common-toolbar">
{isPro && <Search onSearchedClick={this.props.onSearchedClick} placeholder={gettext(this.props.searchPlaceholder)}/>}
{isPro && (
<Search
repoID={this.props.repoID}
placeholder={gettext(this.props.searchPlaceholder)}
onSearchedClick={this.props.onSearchedClick}
/>
)}
<Notification />
<Account />
</div>