giscus / giscus-component

Component library for giscus, a comment system powered by GitHub Discussions.
https://giscus-component.vercel.app
MIT License
328 stars 25 forks source link

React component only allows getting specific discussion number #6

Closed YitziG closed 2 years ago

YitziG commented 3 years ago

Describe the bug A clear and concise description of what the bug is.

Trying to use the React component. All attempted mappings fail with "discussion not found" even though I know it exists.

Posting a new comment creates a new discussion but even that does not show up on refresh.

To Reproduce Steps to reproduce the behavior:

  1. Add react component
  2. Use any mapping aside from number

Expected behavior Should work

Desktop (please complete the following information):

laymonage commented 3 years ago

Hey, sorry for getting back so late, for some reason I wasn't subscribed to the repo.

Could you try checking the Network tab in your browser's DevTools and see the query sent to the API? What's the term in the query?

Laegel commented 2 years ago

Hey @laymonage, I think I ran into a similar problem. The React component wasn't even creating a comment, so no discussion. In the end, I took a look at how you implemented it on your own website and applied it to mine, which works. In my case the term was technos%2Farticles%2Fdeno but I'm not sure that the problem comes from it, as it works with a vanilla JS version. (thanks for Giscus BTW, using GH Discussions as a DB is smart)

laymonage commented 2 years ago

I just tested the latest version (v1.1.1) using a freshly-generated React (and Preact) project with Vite and everything seems to work. Could you confirm?

laymonage commented 2 years ago

Please try with v2.0.0 and report back if the issue still happens.