Add link to edit profile

This commit is contained in:
Kimmo Puputti 2017-12-01 14:41:23 +02:00
parent a27071b665
commit 49cc7eb12e
3 changed files with 25 additions and 0 deletions

View file

@ -382,6 +382,7 @@
}
.yourHostContainer {
position: relative;
padding: 0 24px;
margin-bottom: 5px;
@ -407,6 +408,24 @@
}
}
.editProfileLink {
@apply --marketplaceH4FontStyles;
position: absolute;
margin: 0;
/* Align to same baseline as the "Your host" heading */
top: 2px;
right: 24px;
@media (--viewportMedium) {
margin: 0;
/* Align to same baseline as the "Hello, ..." heading */
top: 74px;
right: 0;
}
}
.map {
/* Dimensions: Map takes all available space from viewport (excludes action button and section title) */
height: calc(100vh - 193px);

View file

@ -479,6 +479,11 @@ export class ListingPageComponent extends Component {
<h2 className={css.yourHostHeading}>
<FormattedMessage id="ListingPage.yourHostHeading" />
</h2>
{isOwnListing ? (
<NamedLink className={css.editProfileLink} name="ProfileSettingsPage">
<FormattedMessage id="ListingPage.editProfileLink" />
</NamedLink>
) : null}
<UserCard
user={currentListing.author}
currentUser={currentUser}

View file

@ -229,6 +229,7 @@
"ListingPage.ctaButtonMessage": "Request to book",
"ListingPage.descriptionTitle": "About this sauna",
"ListingPage.editListing": "Edit listing",
"ListingPage.editProfileLink": "Edit profile",
"ListingPage.errorLoadingListingMessage": "Could not load listing. Please try again.",
"ListingPage.errorLoadingListingTitle": "Error in loading listing",
"ListingPage.hostedBy": "Hosted by {name}",