apal21 / nextjs-progressbar

A simple Next.js progressbar component using NProgress.
https://www.npmjs.com/package/nextjs-progressbar
MIT License
776 stars 61 forks source link

Disable NextProgress on fast changing static pages #91

Open robertocerdasilva opened 1 year ago

robertocerdasilva commented 1 year ago

Hello!

Is there a way to disable NextProgress when visiting pages that contain static content or were created with getStaticProps?

Navigating to those pages is so fast that I don't see the need to show the progress bar in those cases. Very similar to how it works in Gatsby.JS, where the progress bar is only shown when the request is taking time.

Thank you.

eamonma commented 1 year ago

@robertocerdasilva I had the same problem so I made a fork that waits for a certain amount of time before showing the bar. It adds a debounce prop. https://www.npmjs.com/package/@approximant/next-progress

imranbarbhuiya commented 1 year ago

You can pr this feature here too if u want

kdiffin commented 1 year ago

@eamonma thanks bud!

robertocerdasilva commented 1 year ago

@eamonma Thank you so much! it's great

jeffminsungkim commented 1 year ago

@eamonma Your great effort definitely needs to be submitted as a pull request to this library. Thanks man!