ktquez / vue-disqus

Integrate Disqus count and comments in your application Vue 3, with support for SPA
https://ktquez.github.io/vue-disqus/
MIT License
253 stars 26 forks source link

Getting same comments on all pages #20

Closed prajjwaldimri closed 6 years ago

prajjwaldimri commented 6 years ago

Hi, I was trying to integrate vue-disqus into my application but I am getting the same comments on every page.

This is how I am implementing vue-disqus in the app. vue-disqus(shortname="my_short_name" :identifier="disqus_id" :url="disqus_url")

The disqus_id and disqus_url variables are set during the created() hook.

Can you suggest me any fixes for this? Thanks.

ktquez commented 6 years ago

Hi, checks if the identifier and URL are changing on each page.

prajjwaldimri commented 6 years ago

Yup. Everytime a new page loads the variables, to which the identifier and url are binded to, are different.

ktquez commented 6 years ago

Probably the "vue-disqus component" are being built before the data is available.

Uses a "v-if" in the component to only be created when "disqus_url" is available.

prajjwaldimri commented 6 years ago

Fixed. Thanks :+1: