Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem when using gatsby-plugin-transition-link and gatsby-plugin-intl. #176

Open
berpcor opened this issue Mar 22, 2021 · 1 comment
Open

Comments

@berpcor
Copy link

berpcor commented Mar 22, 2021

Hello.
Your plugin has its own Link component.
Also I am using gatsby-plugin-transition-link which has its own Link component too.
How to solve that problem, do you have some mechanism for solving problems when another gatsby plugins have their own Link wrappers?

@belabrockmann
Copy link

belabrockmann commented Apr 26, 2021

I had that some problem as well. I had to kinda put the localization into the transition link (I use AniLink here). So far it has worked but I wish there was a better solution to this.

I get intl.locale from the useIntl() hook in the body of my component like this:
const intl = useIntl()

<AniLink cover duration={1.5} top="entry" direction="top" bg="var(--bg-color)" to={`/${intl.locale}/_url_`}>_Your Text_ </AniLink>

I hope this was helpful, as I've never written a comment on GitHub before.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants