Gallery and other stuff
This commit is contained in:
@@ -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}
|
||||
|
||||
Reference in New Issue
Block a user