Filter NSFW search results (will add option to display them later)
This commit is contained in:
parent
f78c6a65bb
commit
0ebbe4427b
1 changed files with 6 additions and 4 deletions
|
@ -37,10 +37,12 @@ var SearchResults = React.createClass({
|
|||
render: function() {
|
||||
var rows = [];
|
||||
this.props.results.forEach(function(result) {
|
||||
rows.push(
|
||||
<SearchResultRow key={result.name} name={result.name} title={result.title} imgUrl={result.thumbnail}
|
||||
description={result.description} cost_est={result.cost_est} />
|
||||
);
|
||||
if (!result.nsfw) {
|
||||
rows.push(
|
||||
<SearchResultRow key={result.name} name={result.name} title={result.title} imgUrl={result.thumbnail}
|
||||
description={result.description} cost_est={result.cost_est} />
|
||||
);
|
||||
}
|
||||
});
|
||||
return (
|
||||
<div>{rows}</div>
|
||||
|
|
Loading…
Reference in a new issue