Filters done

This commit is contained in:
Edin Dazdarevic
2017-04-05 02:02:43 +02:00
parent d2ee02b6df
commit 15dc596f3d
10 changed files with 150 additions and 30 deletions

View File

@@ -14,7 +14,8 @@ class Main extends React.Component {
listings: (new Map()),
imageIndex: 0,
filters: {
rooms: {}
rooms: {},
category: {}
}
};
}
@@ -99,7 +100,14 @@ class Main extends React.Component {
refreshListings() {
const map = this.map;
const {rooms, minSize, maxSize, minPrice, maxPrice} = this.state.filters;
const {
rooms,
minSize,
maxSize,
minPrice,
maxPrice,
category
} = this.state.filters;
const properties = loadProperties({
bounds: map.getBounds().toUrlValue(),
@@ -107,7 +115,8 @@ class Main extends React.Component {
minSize,
maxSize,
minPrice,
maxPrice
maxPrice,
category
});
properties.then(p=> p.text()).then(p => {