Open Rinmawia opened 1 year ago
I ran into the same problem - it's related to this line where it compares location.origin
of the passed in url vs the url of the current page.
It can be fixed by explicitly passing the origin like:
... ScrollTrigger.create({ ... onEnter: () => { H.redirect(`${window.location.origin}/dest`, 'myTransitionKey') } ... })
I have a code that use gsap scroll trigger to call the H.redirect() when scroll to that element. But instead of transitioning the page, it hard redirect to the destination page.
... ScrollTrigger.create({ ... onEnter: () => { H.redirect('dest', 'myTransitionKey') } ... })