Sorting & showing date

This commit is contained in:
Edin Dazdarevic
2017-04-08 02:11:54 +02:00
parent ffdf1d36b3
commit 027323919e
8 changed files with 1559 additions and 67 deletions

View File

@@ -14,6 +14,7 @@ class Main extends React.Component {
listings: (new Map()),
imageIndex: 0,
page: 0,
sort: 'relevance',
filters: {
rooms: {},
category: {}
@@ -91,7 +92,6 @@ class Main extends React.Component {
map.addListener('idle', () => {
console.log('idle');
this.dispatch({type: 'MAP_IDLE'});
//this.refreshListings();
});
}
@@ -289,7 +289,8 @@ class Main extends React.Component {
minPrice,
maxPrice,
category,
page: this.state.page
page: this.state.page,
sort: this.state.sort
});
@@ -419,6 +420,7 @@ class Main extends React.Component {
} else {
children.push(<Filters filters={this.state.filters} dispatch={this.dispatch.bind(this)} onClose={this.onCloseClick.bind(this)}/>);
children.push(<Listings
sort={this.state.sort}
totalCount={this.state.totalCount}
loadingMore={this.state.loadingMore}
listings={this.state.listings}