NEARFoundation / stats.gallery

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

made the text and link for the twitter share dynamic #72

Closed jhammond2012 closed 2 years ago

jhammond2012 commented 2 years ago

image

image

In this PR, both the link and text are dynamic.

encody commented 2 years ago

Part of the issue is that the Twitter button code actually replaces the HTML in the page with an <iframe>, so the computed properties don't update on page navigation because the target element no longer exists (i.e. it has been replaced with Twitter's custom code). One solution to this problem would be to replace this code with a dynamically re-generated bit of HTML code that we stick into a v-html binding, and then re-run the Twitter button replacer code.

jhammond2012 commented 2 years ago

@encody I have updated this to rerender on route change.

encody commented 2 years ago

The Tweet button does not appear when loading the overview page from the landing page.

2021-11-09-16-02-51