mirror of
https://github.com/kingomarnajjar/flex-template-web.git
synced 2026-07-26 06:47:17 +10:00
Merge pull request #449 from sharetribe/fix-wizard-panel-links
Listing id was assumed to exists.
This commit is contained in:
commit
1d18a86af6
4 changed files with 33 additions and 25 deletions
|
|
@ -25,12 +25,14 @@ const EditListingDescriptionPanel = props => {
|
|||
const currentListing = ensureListing(listing);
|
||||
const { description, title } = currentListing.attributes;
|
||||
const listingTitle = title || '';
|
||||
const params = { id: currentListing.id.uuid, slug: createSlug(title) };
|
||||
const listingLink = (
|
||||
<NamedLink name="ListingPage" params={params}>
|
||||
{listingTitle}
|
||||
</NamedLink>
|
||||
);
|
||||
const listingLink = currentListing.id
|
||||
? <NamedLink
|
||||
name="ListingPage"
|
||||
params={{ id: currentListing.id.uuid, slug: createSlug(title) }}
|
||||
>
|
||||
{listingTitle}
|
||||
</NamedLink>
|
||||
: '';
|
||||
|
||||
const panelTitle = currentListing.id
|
||||
? <FormattedMessage
|
||||
|
|
|
|||
|
|
@ -25,12 +25,14 @@ const EditListingLocationPanel = props => {
|
|||
const currentListing = ensureListing(listing);
|
||||
const { address, geolocation, title } = currentListing.attributes;
|
||||
const listingTitle = title || '';
|
||||
const params = { id: currentListing.id.uuid, slug: createSlug(title) };
|
||||
const listingLink = (
|
||||
<NamedLink name="ListingPage" params={params}>
|
||||
{listingTitle}
|
||||
</NamedLink>
|
||||
);
|
||||
const listingLink = currentListing.id
|
||||
? <NamedLink
|
||||
name="ListingPage"
|
||||
params={{ id: currentListing.id.uuid, slug: createSlug(title) }}
|
||||
>
|
||||
{listingTitle}
|
||||
</NamedLink>
|
||||
: '';
|
||||
|
||||
const panelTitle = currentListing.id
|
||||
? <FormattedMessage
|
||||
|
|
|
|||
|
|
@ -100,12 +100,15 @@ class EditListingPhotosPanel extends Component {
|
|||
const { title } = currentListing.attributes;
|
||||
const listingTitle = title || '';
|
||||
|
||||
const params = { id: currentListing.id.uuid, slug: createSlug(title) };
|
||||
const listingLink = (
|
||||
<NamedLink name="ListingPage" params={params}>
|
||||
{listingTitle}
|
||||
</NamedLink>
|
||||
);
|
||||
const listingLink = currentListing.id
|
||||
? <NamedLink
|
||||
name="ListingPage"
|
||||
params={{ id: currentListing.id.uuid, slug: createSlug(title) }}
|
||||
>
|
||||
{listingTitle}
|
||||
</NamedLink>
|
||||
: '';
|
||||
|
||||
const panelTitle = currentListing.id
|
||||
? <FormattedMessage
|
||||
id="EditListingPhotosPanel.title"
|
||||
|
|
|
|||
|
|
@ -25,13 +25,14 @@ const EditListingPricingPanel = props => {
|
|||
const currentListing = ensureListing(listing);
|
||||
const { price, title } = currentListing.attributes;
|
||||
const listingTitle = title || '';
|
||||
|
||||
const params = { id: currentListing.id.uuid, slug: createSlug(title) };
|
||||
const listingLink = (
|
||||
<NamedLink name="ListingPage" params={params}>
|
||||
{listingTitle}
|
||||
</NamedLink>
|
||||
);
|
||||
const listingLink = currentListing.id
|
||||
? <NamedLink
|
||||
name="ListingPage"
|
||||
params={{ id: currentListing.id.uuid, slug: createSlug(title) }}
|
||||
>
|
||||
{listingTitle}
|
||||
</NamedLink>
|
||||
: '';
|
||||
|
||||
const panelTitle = currentListing.id
|
||||
? <FormattedMessage id="EditListingPricingPanel.title" values={{ listingTitle: listingLink }} />
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue