Show custom attribute category in listing page if present

This commit is contained in:
Kimmo Puputti 2017-12-19 15:51:01 +02:00
parent 0c73dfcba4
commit 9131afd34f
2 changed files with 11 additions and 1 deletions

View file

@ -332,7 +332,7 @@
}
.separator {
margin: 0 10px;
margin: 0 6px;
}
.contactLink {

View file

@ -231,6 +231,15 @@ export class ListingPageComponent extends Component {
title = '',
} = currentListing.attributes;
const { customAttributes } = currentListing.attributes;
const category =
customAttributes && customAttributes.category ? (
<span>
{customAttributes.category}
<span className={css.separator}></span>
</span>
) : null;
const topbar = <TopbarContainer />;
const loadingTitle = intl.formatMessage({
@ -503,6 +512,7 @@ export class ListingPageComponent extends Component {
<div className={css.heading}>
<h1 className={css.title}>{title}</h1>
<div className={css.author}>
{category}
<FormattedMessage id="ListingPage.hostedBy" values={{ name: hostLink }} />
{showContactUser ? (
<span className={css.contactWrapper}>