Open PatelYash7 opened 2 months ago
You have to import useEffect
from nextjs-toploader/app
// Import the useRouter hook from nextjs-toploader to trigger the TopLoader
import { useRouter } from 'nextjs-toploader/app';
Then use it in your code:
const router = useRouter();
router.push('/some-page');
Duplicate of #10
I am creating this issue because i have followed all the required steps to setup nextjs toploader in my NextJS application. But while routing between different routes using Next/navigation, nextjs toploader is notshowing up. here is my layout.ts file:-
here i have tried placing the between/after providers and children.
Dependencies:-