Filter NSFW search results (will add option to display them later)

This commit is contained in:
Alex Liebowitz 2016-08-09 12:17:02 -04:00
parent f78c6a65bb
commit 0ebbe4427b

View file

@ -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>