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