Skip to content

Commit

Permalink
Don’t apply emoji-mart-no-results class when using custom notFound …
Browse files Browse the repository at this point in the history
…component
  • Loading branch information
EtienneLem committed Jul 30, 2018
1 parent 8e6d363 commit 3dc3e2f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
4 changes: 1 addition & 3 deletions src/components/category.js
Original file line number Diff line number Diff line change
Expand Up @@ -176,9 +176,7 @@ export default class Category extends React.Component {
return (
<div
ref={this.setContainerRef}
className={`emoji-mart-category ${
emojis && !emojis.length ? 'emoji-mart-no-results' : ''
}`}
className="emoji-mart-category"
style={containerStyles}
>
<div
Expand Down
6 changes: 3 additions & 3 deletions src/components/not-found.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ export default class NotFound extends React.PureComponent {
render() {
const { data, emojiProps, i18n, notFound } = this.props

const imageComponent = (notFound && notFound()) || (
<div>
const component = (notFound && notFound()) || (
<div className="emoji-mart-no-results">
{NimbleEmoji({
data: data,
...emojiProps,
Expand All @@ -21,7 +21,7 @@ export default class NotFound extends React.PureComponent {
</div>
)

return <div className="emoji-mart-no-results">{imageComponent}</div>
return component
}
}

Expand Down

0 comments on commit 3dc3e2f

Please sign in to comment.