'Back to results' handled properly

This commit is contained in:
Edin Dazdarevic
2017-04-06 02:37:18 +02:00
parent f96cc50687
commit 21ec7c560d
3 changed files with 18 additions and 20 deletions

View File

@@ -132,7 +132,6 @@ class Main extends React.Component {
refreshListings() {
console.log('refreshListings');
const map = this.map;
const {
rooms,
@@ -221,7 +220,6 @@ class Main extends React.Component {
const prevSelected = this.findMarker(this.state.listingId);
if (prevSelected) {
console.log('prevselected', prevSelected);
//prevSelected.marker.setIcon(this.defaultMarkerIcon());
prevSelected.marker.setIcon(this.visitedMarkerIcon());
}
}
@@ -249,18 +247,6 @@ class Main extends React.Component {
})
}
onListingClick() {
this.setState({
listingDetails: true
})
}
onBackClick() {
this.setState({
listingDetails: false
})
}
/*
* Get default marker icon
*/
@@ -359,13 +345,13 @@ class Main extends React.Component {
imageIndex={this.state.imageIndex}
dispatch={this.dispatch.bind(this)}
descriptionExpanded={this.state.descriptionExpanded}
onBackClick={this.onBackClick.bind(this)}/>);
/>);
} else {
children.push(<Filters filters={this.state.filters} dispatch={this.dispatch.bind(this)} onClose={this.onCloseClick.bind(this)}/>);
children.push(<Listings
listings={this.state.listings}
dispatch={this.dispatch.bind(this)}
onListingClick={this.onListingClick.bind(this)}/>);
/>);
}
const content = (
<div className="right-content">