Added bookmarks link to own profile page
• Added: - bookmarks link to own profile page
This commit is contained in:
parent
5f0ba70741
commit
d4175dd982
@ -31,6 +31,7 @@ const messages = defineMessages({
|
|||||||
comments: { id: 'comments', defaultMessage: 'Comments' },
|
comments: { id: 'comments', defaultMessage: 'Comments' },
|
||||||
photos: { id: 'photos', defaultMessage: 'Photos' },
|
photos: { id: 'photos', defaultMessage: 'Photos' },
|
||||||
videos: { id: 'videos', defaultMessage: 'Videos' },
|
videos: { id: 'videos', defaultMessage: 'Videos' },
|
||||||
|
bookmarks: { id: 'bookmarks', defaultMessage: 'Bookmarks' },
|
||||||
accountFollowsYou: { id: 'account.follows_you', defaultMessage: 'Follows you' },
|
accountFollowsYou: { id: 'account.follows_you', defaultMessage: 'Follows you' },
|
||||||
editProfile: { id: "account.edit_profile", defaultMessage: "Edit profile" },
|
editProfile: { id: "account.edit_profile", defaultMessage: "Edit profile" },
|
||||||
})
|
})
|
||||||
@ -117,6 +118,14 @@ class ProfileHeader extends ImmutablePureComponent {
|
|||||||
},
|
},
|
||||||
]
|
]
|
||||||
|
|
||||||
|
const isMyProfile = !account ? false : account.get('id') === me
|
||||||
|
if (isMyProfile) {
|
||||||
|
tabs.push({
|
||||||
|
to: `/${account.get('acct')}/bookmarks`,
|
||||||
|
title: intl.formatMessage(messages.bookmarks),
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
const headerSrc = !!account ? account.get('header') : ''
|
const headerSrc = !!account ? account.get('header') : ''
|
||||||
const headerMissing = headerSrc.indexOf(PLACEHOLDER_MISSING_HEADER_SRC) > -1 || !headerSrc
|
const headerMissing = headerSrc.indexOf(PLACEHOLDER_MISSING_HEADER_SRC) > -1 || !headerSrc
|
||||||
const avatarSize = headerMissing ? 75 : 150
|
const avatarSize = headerMissing ? 75 : 150
|
||||||
|
Loading…
x
Reference in New Issue
Block a user