Gallery and other stuff
This commit is contained in:
@@ -11,6 +11,8 @@ class Main extends React.Component {
|
||||
super(props);
|
||||
this.state = {
|
||||
listingDetails: false,
|
||||
listings: (new Map()),
|
||||
imageIndex: 0,
|
||||
filters: {
|
||||
minPrice: 0
|
||||
}
|
||||
@@ -97,7 +99,7 @@ class Main extends React.Component {
|
||||
marker.addListener('click', () => {
|
||||
console.log('clicking...')
|
||||
this.dispatch({type: 'VIEW_LISTING_DETAILS', action: {
|
||||
id: index
|
||||
id: prop.url
|
||||
}})
|
||||
});
|
||||
}
|
||||
@@ -141,10 +143,12 @@ class Main extends React.Component {
|
||||
const children = [];
|
||||
|
||||
if (this.state.listingDetails) {
|
||||
const listing = this.state.listings[this.state.listingId];
|
||||
console.log('CURRENT LISTINGS', this.state.listings);
|
||||
const listing = this.state.listings.get(this.state.listingId);
|
||||
console.log(this.state);
|
||||
children.push(<ListingDetails
|
||||
listing={listing}
|
||||
imageIndex={this.state.imageIndex}
|
||||
dispatch={this.dispatch.bind(this)}
|
||||
descriptionExpanded={this.state.descriptionExpanded}
|
||||
onBackClick={this.onBackClick.bind(this)}/>);
|
||||
|
||||
Reference in New Issue
Block a user