brohlson / gatsby-plugin-anchor-links

⚓ Gatsby plugin for using smooth scroll anchor links with a Gatsby Link component
https://www.npmjs.com/package/gatsby-plugin-anchor-links
MIT License
68 stars 22 forks source link

using stripHash doesnt work on production #9

Closed mustofa-binary closed 4 years ago

mustofa-binary commented 4 years ago

i tried to use the plugin like this in gatsby-config.js

        {
            resolve: 'gatsby-plugin-anchor-links',
            options: {
                offset: -100,
            },
        },

and

 <AnchorLink to="/#how-it-works" stripHash>How it works</AnchorLink>
 <AnchorLink to="/#about-us" stripHash>About us</AnchorLink>
 <AnchorLink to="/#our-clients" stripHash>Testimonials</AnchorLink>

when run in local it works, smooth scroll also works, but when i deploy to netlify, eveytime i click on the link, it just goes to the top page, if i dont use stripHash, it will just go to the target, no smooth scroll.

brohlson commented 4 years ago

Can you share a production link & repo?

mohammed786 commented 4 years ago

I am facing a similar issue you can check it out here - https://www.loginradius.com/docs/developer/api