Gallery and other stuff

This commit is contained in:
Edin Dazdarevic
2017-04-02 03:31:39 +02:00
parent d6c2e857d0
commit e02cce155b
10 changed files with 4611 additions and 815 deletions

View File

@@ -1,4 +1,5 @@
import React from 'react';
import Gallery from './gallery';
export default class ListingDetails extends React.Component {
onReadMore (e) {
@@ -14,8 +15,12 @@ export default class ListingDetails extends React.Component {
render() {
const {listing, descriptionExpanded} = this.props;
if (!listing) {
return null;
}
const descriptionClasses = descriptionExpanded ? "ld-description expanded" : "ld-description";
const images = listing.images.map((image) => ({original: image, thumbnail: image}))
return (
<div className="ld-container">
<div className="ld-header">
@@ -37,9 +42,10 @@ export default class ListingDetails extends React.Component {
</div>
<div className="ld-details">
<div className="ld-image-container">
<img src={listing.images[0]}></img>
</div>
<Gallery
dispatch={this.props.dispatch}
images={listing.images}
imageIndex={this.props.imageIndex} />
<div className="ld-price-address-box">
<div className="ld-price">
{listing.price}