Closed marfin-lab closed 2 years ago
_app.js ` // Components // Natives import { NextIntlProvider } from 'next-intl'; import { useRouter } from 'next/router'; import { useEffect } from 'react';
// * Dependencies import NextNprogress from 'nextjs-progressbar'; import * as gtag from '/services/gtag'; import Analytics from '/components/global/analytics'; // * Context import { AppWrapper } from '/context/state'; // * CSS import 'tailwindcss/tailwind.css'; // * Render export default function MyApp({ Component, pageProps }) { const router = useRouter(); useEffect(() => { const handleRouteChange = url => { gtag.pageview(url); } router.events.on('routeChangeComplete', handleRouteChange); return () => { router.events.off('routeChangeComplete', handleRouteChange) } }, [router.events]); return ( <> <NextIntlProvider messages={pageProps.messages}> <AppWrapper> <NextNProgress color='#3e63ca' /> <Component {...pageProps} className='antialiased' /> <Analytics /> </AppWrapper> </NextIntlProvider> </> ) }
`
What i'm doing wrong?
Check the spelling again...
import NextNprogress from 'nextjs-progressbar';
This has lowercase P and,
P
<NextNProgress color='#3e63ca' />
this has uppercase P
_app.js ` // Components // Natives import { NextIntlProvider } from 'next-intl'; import { useRouter } from 'next/router'; import { useEffect } from 'react';
`
What i'm doing wrong?