Skip to content

Commit

Permalink
Change formatted title and sub title type
Browse files Browse the repository at this point in the history
Change formatted title and sub title type to node in BookingPanel.
Also remove FormattedText component which renders a redundant span element.
  • Loading branch information
lyyder committed Dec 19, 2018
1 parent 2b46956 commit f7407da
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
6 changes: 3 additions & 3 deletions src/components/BookingPanel/BookingPanel.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React from 'react';
import { compose } from 'redux';
import { withRouter } from 'react-router-dom';
import { intlShape, injectIntl } from 'react-intl';
import { arrayOf, bool, func, object, oneOfType, shape, string } from 'prop-types';
import { arrayOf, bool, func, node, oneOfType, shape, string } from 'prop-types';
import { FormattedMessage } from 'react-intl';
import classNames from 'classnames';
import omit from 'lodash/omit';
Expand Down Expand Up @@ -168,8 +168,8 @@ BookingPanel.propTypes = {
isOwnListing: bool,
unitType: propTypes.bookingUnitType,
handleBookingSubmit: func.isRequired,
title: oneOfType([object, string]).isRequired,
subTitle: oneOfType([object, string]),
title: oneOfType([node, string]).isRequired,
subTitle: oneOfType([node, string]),
authorDisplayName: string.isRequired,
onManageDisableScrolling: func.isRequired,
timeSlots: arrayOf(propTypes.timeSlot),
Expand Down
4 changes: 1 addition & 3 deletions src/containers/ListingPage/ListingPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -229,9 +229,7 @@ export class ListingPageComponent extends Component {
</span>
);

const bookingTitle = (
<FormattedMessage id="ListingPage.bookingTitle" values={{ title: richTitle }} />
);
const bookingTitle = intl.formatMessage({ id: 'ListingPage.bookingSubTitle' }, { title: richTitle });
const bookingSubTitle = intl.formatMessage({ id: 'ListingPage.bookingSubTitle' });

const topbar = <TopbarContainer />;
Expand Down

0 comments on commit f7407da

Please sign in to comment.