Small fixes
This commit is contained in:
29
web/dist/main.css
vendored
29
web/dist/main.css
vendored
@@ -181,18 +181,6 @@ html {
|
||||
margin-left: -1px;
|
||||
}
|
||||
|
||||
.filter-bottom {
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
width: 99%;
|
||||
height: 50px;
|
||||
display: flex;
|
||||
text-align: center;
|
||||
padding-left: 10px;
|
||||
padding-right: 0;
|
||||
align-items: baseline;
|
||||
}
|
||||
|
||||
.filter-title {
|
||||
width: 40%;
|
||||
@@ -474,7 +462,24 @@ html {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.filter-bottom {
|
||||
display: none;
|
||||
}
|
||||
|
||||
@media (max-width : 768px) {
|
||||
.filter-bottom {
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
width: 99%;
|
||||
height: 50px;
|
||||
display: flex;
|
||||
text-align: center;
|
||||
padding-left: 10px;
|
||||
padding-right: 0;
|
||||
align-items: baseline;
|
||||
}
|
||||
|
||||
.listings-count {
|
||||
display: none;
|
||||
}
|
||||
|
||||
@@ -102,19 +102,6 @@ export default class Filters extends React.Component {
|
||||
}
|
||||
|
||||
onResetSearch (e) {
|
||||
this.props.dispatch({
|
||||
type: 'UPDATE_ROUTE',
|
||||
action: {
|
||||
params: {
|
||||
minPrice: '',
|
||||
maxPrice: '',
|
||||
minSize: '',
|
||||
maxSize: '',
|
||||
rooms: '',
|
||||
category: ''
|
||||
}
|
||||
}
|
||||
})
|
||||
this.props.dispatch({
|
||||
type: 'RESET_FILTERS'
|
||||
})
|
||||
|
||||
@@ -95,7 +95,8 @@ class Main extends React.Component {
|
||||
});
|
||||
|
||||
var options = {
|
||||
componentRestrictions: {country: 'BA'}
|
||||
componentRestrictions: {country: 'BA'},
|
||||
types: [ 'geocode' ]
|
||||
}
|
||||
|
||||
const regularIdle = () => {
|
||||
@@ -163,6 +164,8 @@ class Main extends React.Component {
|
||||
this.dispatch({type: 'MOBILE_MAP_VIEW'})
|
||||
map.fitBounds(place.geometry.viewport)
|
||||
}
|
||||
|
||||
map.setZoom(map.zoom + 1);
|
||||
} else {
|
||||
map.setCenter(place.geometry.location)
|
||||
map.setZoom(18)
|
||||
|
||||
@@ -390,6 +390,8 @@ const resetFilters = ({type, action}, component) => {
|
||||
rooms: {},
|
||||
category: {}
|
||||
}
|
||||
}, () => {
|
||||
component.router.reset()
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
@@ -3,6 +3,7 @@ import clone from 'lodash.clonedeep'
|
||||
export default class Router {
|
||||
constructor (comp, initialState) {
|
||||
this.component = comp
|
||||
this.initialState = clone(initialState)
|
||||
this.state = clone(initialState) || {}
|
||||
|
||||
window.onpopstate = event => {
|
||||
@@ -15,6 +16,17 @@ export default class Router {
|
||||
}
|
||||
}
|
||||
|
||||
reset () {
|
||||
this.state = {
|
||||
zoom: this.state.zoom,
|
||||
sort: this.state.sort,
|
||||
bounds: this.state.bounds,
|
||||
rooms: {},
|
||||
category: {}
|
||||
}
|
||||
this.update({})
|
||||
}
|
||||
|
||||
update (state) {
|
||||
const params = []
|
||||
if (state.params) {
|
||||
|
||||
Reference in New Issue
Block a user