mirror of
https://github.com/kingomarnajjar/flex-template-web.git
synced 2026-07-28 20:53:24 +10:00
Link to listing edit page
This commit is contained in:
parent
da08707e83
commit
c20fc61f9e
2 changed files with 12 additions and 0 deletions
|
|
@ -19,6 +19,7 @@ import {
|
|||
PageLayout,
|
||||
ResponsiveImage,
|
||||
Topbar,
|
||||
NamedLink,
|
||||
} from '../../components';
|
||||
import { BookingDatesForm } from '../../containers';
|
||||
import { getListingsById } from '../../ducks/marketplaceData.duck';
|
||||
|
|
@ -171,6 +172,15 @@ export class ListingPageComponent extends Component {
|
|||
? <BookingDatesForm className={css.bookingForm} onSubmit={this.onSubmit} price={price} />
|
||||
: null;
|
||||
|
||||
const editParams = { ...params, type: 'edit', tab: 'description' };
|
||||
const editListingLink = isOwnListing
|
||||
? <p>
|
||||
<NamedLink name="EditListingPage" params={editParams}>
|
||||
<FormattedMessage id="ListingPage.editListing" />
|
||||
</NamedLink>
|
||||
</p>
|
||||
: null;
|
||||
|
||||
const listingClasses = classNames(css.pageRoot, { [css.bookable]: showBookButton });
|
||||
|
||||
return (
|
||||
|
|
@ -270,6 +280,7 @@ export class ListingPageComponent extends Component {
|
|||
</div>
|
||||
|
||||
{bookingHeading}
|
||||
{editListingLink}
|
||||
{bookingDatesForm}
|
||||
</ModalInMobile>
|
||||
{showBookButton
|
||||
|
|
|
|||
|
|
@ -118,6 +118,7 @@
|
|||
"ListingPage.noListingData": "Could not find listing data",
|
||||
"ListingPage.ownListing": "This is your own listing.",
|
||||
"ListingPage.perNight": "per night",
|
||||
"ListingPage.editListing": "edit",
|
||||
"LoginForm.emailLabel": "Email",
|
||||
"LoginForm.emailPlaceholder": "john.doe@example.com",
|
||||
"LoginForm.emailRequired": "This field is required",
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue