NEARFoundation / stats.gallery

Big & fun NEAR account analytics!
https://stats.gallery
GNU General Public License v3.0
33 stars 18 forks source link

Twitter button shares wrong page link #68

Closed encody closed 2 years ago

encody commented 2 years ago

Describe the bug Clicking on the "Tweet" button when on the leaderboards page opens a prefilled tweet that says "Check out my NEAR stats" but with a link to the leaderboards page.

To Reproduce Steps to reproduce the behavior:

  1. Navigate to a NEAR account's overview page
  2. Click on the "Leaderboards" navigation link
  3. Reload the page
  4. Click on the "Tweet" button in the header

Expected behavior Either the text of the tweet is something like "Check out the leaderboards on NEAR" with the link to leaderboards, or it shares the link to the user's overview page with the original tweet text.

Screenshots

brave_2021-10-14-14-10-42

Additional context I have seen real tweets with this bug.

akshajb commented 2 years ago

Hey @encody I would like to take this issue up.

encody commented 2 years ago

@akshajb we'd love the help! Submit a PR with your fix and I'd be happy to review it

akshajb commented 2 years ago

I had a query, currently all the 5 sections, overview, stats, transactions, quests, leaderboards share the same header which has the twitter button in it. Would you want dynamic text and link for each of the sections or just for leaderboards and the rest are same as overview?

encody commented 2 years ago

@akshajb hm, every section is probably more intuitive, but use your best judgement

akshajb commented 2 years ago

70 Here is the PR. Please refresh the page while checking each section, cause there were some CORS errors on localhost so it was not refreshing by itself.

encody commented 2 years ago

Discussion on https://github.com/NEAR-Edu/stats.gallery/pull/70 elaborates on more facets of the issue.

encody commented 2 years ago

Fixed by https://github.com/NEAR-Edu/stats.gallery/pull/72