Proper Title Displayed Above Other User's Feeds

in #utopian-io7 years ago (edited)

Issue

When a Steemit user visited the feed of another user (https://steemit.com/@__user__/feed), the title of the page read "My Feed" even though it was the feed of another user. This Github issue describes the problem.
The problem
This is a screenshot of another user's feed. Notice that the title of the page is "My Feed". This image was taken from the issue on Github.

Solution

To fix this problem, I modified the PostsIndex page to use a variable containing the username of the feed we are viewing. If that username is the same as the username of the user logged in, it still says "My Feed". Otherwise, it changes the title of the page to "User's Feed".

Whereas the previous code merely checked to see if the user was viewing a feed and automatically labelled it 'My Feed', my code also checks if (account_name === this.props.username). If this is true, the user is viewing their own feed and it says 'My Feed'. In the else case, it sets the page title to account_name + "'s Feed".

Viewing your own feed

Viewing another user's feed



Posted on Utopian.io - Rewarding Open Source Contributors

Sort:  

Thank you for the contribution. It has been approved.

I would have liked to see at least one picture, be creative.

Your post is too short. Elaborate more, explain your choices, show the code.

The reviewer on github took the time to do a screenshot of before and after and I do believe this would be great for this post. (Edit and add them!)

You can contact us on Discord.
[utopian-moderator]

I edited my post. I added the screenshots my reviewer used and also added more explanation with code in it.

Hey @helo, I just gave you a tip for your hard work on moderation. Upvote this comment to support the utopian moderators and increase your future rewards!

Hey @bruce-forks I am @utopian-io. I have just upvoted you!

Achievements

  • You have less than 500 followers. Just gave you a gift to help you succeed!
  • Seems like you contribute quite often. AMAZING!

Community-Driven Witness!

I am the first and only Steem Community-Driven Witness. Participate on Discord. Lets GROW TOGETHER!

mooncryption-utopian-witness-gif

Up-vote this comment to grow my power and help Open Source contributions like this one. Want to chat? Join me on Discord https://discord.gg/Pc8HG9x

Congratulations @bruce-forks! You received a personal award!

Happy Birthday! - You are on the Steem blockchain for 1 year!

Click here to view your Board

Support SteemitBoard's project! Vote for its witness and get one more award!

Congratulations @bruce-forks! You received a personal award!

Happy Birthday! - You are on the Steem blockchain for 2 years!

You can view your badges on your Steem Board and compare to others on the Steem Ranking

Vote for @Steemitboard as a witness to get one more award and increased upvotes!

Coin Marketplace

STEEM 0.21
TRX 0.20
JST 0.034
BTC 90661.84
ETH 3146.93
USDT 1.00
SBD 2.98