Added bookmarks link to own profile page

• Added:
- bookmarks link to own profile page
This commit is contained in:
mgabdev 2020-07-24 22:37:26 -05:00
parent 5f0ba70741
commit d4175dd982

View File

@ -31,6 +31,7 @@ const messages = defineMessages({
comments: { id: 'comments', defaultMessage: 'Comments' },
photos: { id: 'photos', defaultMessage: 'Photos' },
videos: { id: 'videos', defaultMessage: 'Videos' },
bookmarks: { id: 'bookmarks', defaultMessage: 'Bookmarks' },
accountFollowsYou: { id: 'account.follows_you', defaultMessage: 'Follows you' },
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 headerMissing = headerSrc.indexOf(PLACEHOLDER_MISSING_HEADER_SRC) > -1 || !headerSrc
const avatarSize = headerMissing ? 75 : 150