minor search page fixes

This commit is contained in:
Edin Dazdarevic
2015-03-23 00:19:48 +01:00
parent e23bfe0a7f
commit 0ff47313df
3 changed files with 23 additions and 11 deletions

View File

@@ -14,16 +14,21 @@ var SearchResultsPage = React.createClass({
return SearchStore.getSearchResultsState();
},
render: function() {
var content;
if (this.state.items.length > 0) {
content = <ItemList items={this.state.items} />
} else {
content = <div>Nema rezultata za vašu pretragu.</div>
}
return (
<div>
<h1>Resultati pretrage za {this.state.q}</h1>
<div>
<h2>Rezultati pretrage za '{this.state.q}'</h2>
<ItemList items={this.state.items} />
</div>
{content}
</div>
);
},
componentWillReceiveProps: function() {
this.update();