mirror of
https://github.com/kingomarnajjar/flex-template-web.git
synced 2026-07-29 05:00:43 +10:00
Render listing location if it exists
This commit is contained in:
parent
ef5fca7f56
commit
c5a983d309
3 changed files with 12 additions and 1 deletions
|
|
@ -30,7 +30,8 @@
|
|||
height: 100%;
|
||||
}
|
||||
|
||||
.description {
|
||||
.description,
|
||||
.address {
|
||||
margin: 2rem;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -56,6 +56,8 @@ export class ListingPageComponent extends Component {
|
|||
|
||||
const title = currentListing ? currentListing.attributes.title : '';
|
||||
const description = currentListing ? currentListing.attributes.description : '';
|
||||
const address = currentListing ? currentListing.attributes.address : '';
|
||||
const geolocation = currentListing ? currentListing.attributes.geolocation : null;
|
||||
|
||||
// TODO Responsive image-objects need to be thought through when final image sizes are know
|
||||
const images = currentListing && currentListing.images
|
||||
|
|
@ -88,6 +90,9 @@ export class ListingPageComponent extends Component {
|
|||
{/* eslint-disable react/no-danger */}
|
||||
<div className={css.description} dangerouslySetInnerHTML={{ __html: description }} />
|
||||
{/* eslint-enable react/no-danger */}
|
||||
<div className={css.address}>
|
||||
{address} {geolocation ? `(${geolocation.lat}, ${geolocation.lng})` : null}
|
||||
</div>
|
||||
<div className={css.filterSection}>
|
||||
<h1>Here will be filters (or dragons)</h1>
|
||||
<h2>Studio type</h2>
|
||||
|
|
|
|||
|
|
@ -7,6 +7,11 @@ exports[`ListingPage matches snapshot 1`] = `
|
|||
"__html": "listing1 description",
|
||||
}
|
||||
} />
|
||||
<div>
|
||||
listing1 address
|
||||
|
||||
(40, 60)
|
||||
</div>
|
||||
<div>
|
||||
<h1>
|
||||
Here will be filters (or dragons)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue