mirror of
https://github.com/kingomarnajjar/flex-template-web.git
synced 2026-07-31 02:26:50 +10:00
Don't let people to book their own listing
This commit is contained in:
parent
4bf8b73b1a
commit
804f3b67ab
1 changed files with 21 additions and 14 deletions
|
|
@ -156,6 +156,25 @@ export class ListingPageComponent extends Component {
|
|||
</div>
|
||||
: null;
|
||||
|
||||
const bookingHeading = !isOwnListing
|
||||
? <div className={css.bookingHeading}>
|
||||
<h2 className={css.bookingTitle}>
|
||||
<FormattedMessage id="ListingPage.bookingTitle" values={{ title }} />
|
||||
</h2>
|
||||
<div className={css.bookingHelp}>
|
||||
<FormattedMessage id="ListingPage.bookingHelp" />
|
||||
</div>
|
||||
</div>
|
||||
: null;
|
||||
|
||||
const bookingDatesForm = !isOwnListing
|
||||
? <BookingDatesForm
|
||||
className={css.bookingForm}
|
||||
onSubmit={this.onSubmit}
|
||||
price={price}
|
||||
/>
|
||||
: null;
|
||||
|
||||
const listingClasses = classNames(css.pageRoot, { [css.bookable]: showBookButton });
|
||||
|
||||
return (
|
||||
|
|
@ -254,20 +273,8 @@ export class ListingPageComponent extends Component {
|
|||
</div>
|
||||
</div>
|
||||
|
||||
<div className={css.bookingHeading}>
|
||||
<h2 className={css.bookingTitle}>
|
||||
<FormattedMessage id="ListingPage.bookingTitle" values={{ title }} />
|
||||
</h2>
|
||||
<div className={css.bookingHelp}>
|
||||
<FormattedMessage id="ListingPage.bookingHelp" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<BookingDatesForm
|
||||
className={css.bookingForm}
|
||||
onSubmit={this.onSubmit}
|
||||
price={price}
|
||||
/>
|
||||
{bookingHeading}
|
||||
{bookingDatesForm}
|
||||
</ModalInMobile>
|
||||
{showBookButton
|
||||
? <div className={css.openBookingForm}>
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue