Progress on contact
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import React from 'react'
|
||||
import Gallery from './gallery'
|
||||
import {formatPrice} from '../lib/helpers'
|
||||
import ContactModal from './ContactModal';
|
||||
|
||||
export default class ListingDetails extends React.Component {
|
||||
onReadMore (e) {
|
||||
@@ -23,8 +24,14 @@ export default class ListingDetails extends React.Component {
|
||||
this.props.dispatch({type: 'BACK_TO_RESULTS'})
|
||||
}
|
||||
|
||||
onContactClick () {
|
||||
this.props.dispatch({
|
||||
type: 'OPEN_CONTACT'
|
||||
});
|
||||
}
|
||||
|
||||
render () {
|
||||
const {listing, descriptionExpanded} = this.props
|
||||
const {listing, descriptionExpanded, contactFormOpen} = this.props
|
||||
if (!listing) {
|
||||
return null
|
||||
}
|
||||
@@ -94,7 +101,7 @@ export default class ListingDetails extends React.Component {
|
||||
</div>
|
||||
</div>
|
||||
<div className="ld-check-availability">
|
||||
<button>Kontaktiraj</button>
|
||||
<button onClick={this.onContactClick.bind(this)}>Kontaktiraj</button>
|
||||
</div>
|
||||
<div className={descriptionClasses}>
|
||||
{listing.longDescription}
|
||||
@@ -108,6 +115,8 @@ export default class ListingDetails extends React.Component {
|
||||
: null}
|
||||
<div className="ld-footer" />
|
||||
</div>
|
||||
|
||||
{contactFormOpen ? <ContactModal dispatch={this.props.dispatch} /> : null}
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user