Add the following to the top of your Layout.js componet
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import NProgress from 'nprogress'; | |
import router from 'next/router'; | |
router.onRouteChangeStart = () => NProgress.start(); | |
router.onRouteChangeComplete = () => NProgress.done(); | |
router.onRouteChangeError = () => NProgress.done(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment