Sorting & showing date
This commit is contained in:
@@ -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}
|
||||
|
||||
Reference in New Issue
Block a user