Skyleen77 / next-nprogress-bar

NProgress integration on Next.js compatible with /app and /pages folders
https://next-nprogress-bar.vercel.app
315 stars 24 forks source link

Progress bar not showing on router.back() in app dir #9

Closed savicaleksa closed 1 year ago

savicaleksa commented 1 year ago

Currently the progress bar isn't showed when using router.back(), which may be intentional, but I think that it could be useful in some cases, or just look nice based on personal preference. Showing the bar as a default option would work, but I think we could make a function like:

function back(options: {showProgressBar?: boolean}){}

and show it conditionally.

I'd be glad to submit a PR for this change and contribute to this wonderful project if I have your permission.

Skyleen77 commented 1 year ago

The fix is online.

Thank you