Untitled
unknown
tsx
a year ago
369 B
2
Indexable
Never
// show progress-bar before change route TopBarProgress.config({ barColors: { 0: '#0b84b3' }, }); const [topProgressBar, setTopProgressBar] = useState<boolean>(false); Router.events.on('routeChangeStart', (): void => { setTopProgressBar(true); }); Router.events.on('routeChangeComplete', (): void => { setTopProgressBar(false); });