But since this library just adds event handlers to every link, while page transitions do properly get blocked, the progress bar starts regardless and then just runs forever.
So I combined the above code with a context/provider to register when navigation has been intercepted; and then based on the intercept status, disable the anchor bindings for nprogress. This way, it all works and no issues with mystery progress bars.
Based on top of #59
Adds a flag to the progress bar that allows you to disable the anchor click handlers.
TODO
In my case, I am using this workaround from a NextJS discussion where one monkey-patches the app router implementation to allow for blocking navigation.
But since this library just adds event handlers to every link, while page transitions do properly get blocked, the progress bar starts regardless and then just runs forever.
So I combined the above code with a context/provider to register when navigation has been intercepted; and then based on the intercept status, disable the anchor bindings for
nprogress
. This way, it all works and no issues with mystery progress bars.