diff --git a/src/containers/ListingPage/ListingPage.js b/src/containers/ListingPage/ListingPage.js
index 6428fbbf..84199c73 100644
--- a/src/containers/ListingPage/ListingPage.js
+++ b/src/containers/ListingPage/ListingPage.js
@@ -1,6 +1,6 @@
/* eslint-disable jsx-a11y/no-static-element-interactions */
import React, { Component } from 'react';
-import { arrayOf, bool, func, shape, string, oneOf } from 'prop-types';
+import { array, arrayOf, bool, func, shape, string, oneOf } from 'prop-types';
import { FormattedMessage, intlShape, injectIntl } from 'react-intl';
import { compose } from 'redux';
import { connect } from 'react-redux';
@@ -246,23 +246,8 @@ export class ListingPageComponent extends Component {
);
- const category =
- publicData && publicData.category ? (
-
- {categoryLabel(categoriesConfig, publicData.category)}
- •
-
- ) : null;
-
const topbar = ;
- const loadingTitle = intl.formatMessage({
- id: 'ListingPage.loadingListingTitle',
- });
- const errorTitle = intl.formatMessage({
- id: 'ListingPage.errorLoadingListingTitle',
- });
-
if (showListingError && showListingError.status === 404) {
// 404 listing not found
@@ -270,6 +255,10 @@ export class ListingPageComponent extends Component {
} else if (showListingError) {
// Other error in fetching listing
+ const errorTitle = intl.formatMessage({
+ id: 'ListingPage.errorLoadingListingTitle',
+ });
+
return (
@@ -288,6 +277,10 @@ export class ListingPageComponent extends Component {
} else if (!currentListing.id) {
// Still loading the listing
+ const loadingTitle = intl.formatMessage({
+ id: 'ListingPage.loadingListingTitle',
+ });
+
return (
@@ -343,8 +336,6 @@ export class ListingPageComponent extends Component {
}
};
- const editParams = { id: listingId.uuid, slug: listingSlug, type: 'edit', tab: 'description' };
-
const handleBookButtonClick = () => {
const isCurrentlyClosed = currentListing.attributes.state === LISTING_STATE_CLOSED;
if (isOwnListing || isCurrentlyClosed) {
@@ -389,6 +380,14 @@ export class ListingPageComponent extends Component {
);
+ const category =
+ publicData && publicData.category ? (
+
+ {categoryLabel(categoriesConfig, publicData.category)}
+ •
+
+ ) : null;
+
return (
this.setState({ imageCarouselOpen: false })}
handleViewPhotosClick={handleViewPhotosClick}
@@ -532,6 +536,9 @@ ListingPageComponent.propTypes = {
sendEnquiryInProgress: bool.isRequired,
sendEnquiryError: propTypes.error,
onSendEnquiry: func.isRequired,
+
+ categoriesConfig: array,
+ amenitiesConfig: array,
};
const mapStateToProps = state => {