import React from 'react'; import Gallery from './gallery'; export default class ListingDetails extends React.Component { onReadMore (e) { e.preventDefault(); this.props.dispatch({type: 'EXPAND_DESCRIPTION'}); } onBackClick() { if (this.props.onBackClick) { this.props.onBackClick(); } } 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 (