2020-12-06 21:49:37 +11:00
|
|
|
// import App from 'next/app'
|
2021-09-05 16:12:45 +10:00
|
|
|
import "@fortawesome/fontawesome-free/css/all.min.css";
|
|
|
|
|
import 'bootstrap-css-only/css/bootstrap.min.css';
|
|
|
|
|
import 'mdbreact/dist/css/mdb.css';
|
2021-02-04 14:27:14 +11:00
|
|
|
import { Fragment, useEffect } from 'react';
|
2020-12-06 21:49:37 +11:00
|
|
|
import "../components/css/styles.css"
|
2021-02-04 14:27:14 +11:00
|
|
|
import { Router, useRouter } from 'next/router'
|
|
|
|
|
|
|
|
|
|
//Router.events.on('routeChangeComplete', (url) => gtag.pageview(url))
|
2020-12-06 21:49:37 +11:00
|
|
|
|
|
|
|
|
function MyApp({ Component, pageProps }) {
|
2021-02-04 14:27:14 +11:00
|
|
|
const router = useRouter()
|
|
|
|
|
useEffect(() => {
|
|
|
|
|
const handleRouteChange = (url) => {
|
2021-09-05 16:12:45 +10:00
|
|
|
// gtag.pageview(url);
|
|
|
|
|
// console.log("Pageview is happening")
|
2021-02-04 14:27:14 +11:00
|
|
|
};
|
|
|
|
|
router.events.on("routeChangeComplete", handleRouteChange);
|
|
|
|
|
return () => {
|
|
|
|
|
router.events.off("routeChangeComplete", handleRouteChange);
|
|
|
|
|
};
|
|
|
|
|
}, [router.events]);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return (
|
|
|
|
|
<Component {...pageProps} />
|
|
|
|
|
)
|
2020-12-06 21:49:37 +11:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Only uncomment this method if you have blocking data requirements for
|
|
|
|
|
// every single page in your application. This disables the ability to
|
|
|
|
|
// perform automatic static optimization, causing every page in your app to
|
|
|
|
|
// be server-side rendered.
|
|
|
|
|
//
|
|
|
|
|
// MyApp.getInitialProps = async (appContext) => {
|
|
|
|
|
// // calls page's `getInitialProps` and fills `appProps.pageProps`
|
|
|
|
|
// const appProps = await App.getInitialProps(appContext);
|
|
|
|
|
//
|
|
|
|
|
// return { ...appProps }
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
export default MyApp
|