Move GA into root of App

This commit is contained in:
Xevion
2022-12-18 18:21:46 -06:00
parent 34af3cceac
commit c0e3615e76
2 changed files with 9 additions and 6 deletions

View File

@@ -1,11 +1,15 @@
import { type AppType } from "next/app";
import {type AppType} from "next/app";
import { trpc } from "@/utils/trpc";
import {trpc} from "@/utils/trpc";
import "@/styles/globals.scss";
import {GoogleAnalytics} from "nextjs-google-analytics";
const MyApp: AppType = ({ Component, pageProps }) => {
return <Component {...pageProps} />;
const App: AppType = ({Component, pageProps}) => {
return <>
<GoogleAnalytics trackPageViews/>
<Component {...pageProps} />;
</>
};
export default trpc.withTRPC(MyApp);
export default trpc.withTRPC(App);

View File

@@ -13,7 +13,6 @@ const Home: NextPage = () => {
return (
<>
<Head>
<GoogleAnalytics trackPageViews/>
<title>100prisoners.com</title>
<link rel="icon" href="/favicon.ico"/>
</Head>