prismicio / prismic-react

React components and hooks to fetch and present Prismic content
https://prismic.io/docs/technologies/homepage-reactjs
Apache License 2.0
152 stars 40 forks source link

Prismic Gatsby V6 links not resolving #192

Open jodiedoubleday opened 1 year ago

jodiedoubleday commented 1 year ago

Versions

Reproduction

Repo is private but can give access if requested

Steps to reproduce

I'm using the latest gatsby-source-prismicand @rismicio/react plugins. Whenever I add a link in a richText field the link doesn't resolve, instead it just links to the page you are on. This works if I downgrade @prismicio/react to 2.5.2 it works correctly, I'm not sure if it's an issue on this repo or Gatsby Prismic, I have made a duplicate issue on the Gatsby repo - https://github.com/prismicio/prismic-gatsby/issues/538.

Im using the plugin in the following way...

<PrismicLink field={slice.primary.button_link}>
  LINK
</PrismicLink>

I think previously it was mentioned that this might be the incorrect way of using this plugin and instead using...

<PrismicLink href={slice.primary.button_link.url}>
  LINK
</PrismicLink>

If I'm using it incorrectly, lease let me know and I'll adjust the code.

What is expected?

richText links would resolve to the correct lace as with previous versions.

What is actually happening?

The link doesn't resolve and instead links to itself.