Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Plugin Browser: Use the no result component to render no results in plugin browser search #1773

Merged
merged 1 commit into from
Dec 21, 2015
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions client/my-sites/plugins/plugins-browser/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import SectionNav from 'components/section-nav'
import MainComponent from 'components/main'
import NavTabs from 'components/section-nav/tabs'
import NavItem from 'components/section-nav/item'
import NoResults from 'my-sites/no-results'
import PluginsList from 'my-sites/plugins/plugins-browser-list'
import PluginsListStore from 'lib/plugins/wporg-data/list-store'
import PluginsActions from 'lib/plugins/wporg-data/actions'
Expand Down Expand Up @@ -128,10 +129,10 @@ module.exports = React.createClass( {
if ( this.getPluginsFullList( 'search' ).length > 0 || isFetching ) {
return <PluginsList plugins={ this.getPluginsFullList( 'search' ) } listName={ searchTerm } title={ searchTerm } site={ this.props.site } showPlaceholders={ isFetching } currentSites={ this.props.sites.getSelectedOrAllJetpackCanManage() } />;
}
return <EmptyContent
title={ this.translate( 'Nothing to see here!' ) }
line={ this.translate( 'We could\'t find any plugin with that text' ) }
illustration={ '/calypso/images/drake/drake-404.svg' } />;
return <NoResults text={ this.translate( 'No plugins match your search for {{searchTerm/}}.', {
textOnly: true,
components: { searchTerm: <em>{ searchTerm }</em> }
} ) } />
},

getPluginSingleListView( category ) {
Expand Down