From 43014360ad36bd3b9bef1526922767588ba60d9c Mon Sep 17 00:00:00 2001 From: Hossam Magdy Date: Mon, 21 Dec 2020 21:15:42 +0100 Subject: [PATCH] fix(google-analytics): was not loading when extracted in separate component --- 404.tsx | 12 ++++++++---- app.tsx | 12 ++++++++---- components/google-analytics-script.tsx | 21 --------------------- 3 files changed, 16 insertions(+), 29 deletions(-) delete mode 100644 components/google-analytics-script.tsx diff --git a/404.tsx b/404.tsx index 373b45c..24c4a5e 100644 --- a/404.tsx +++ b/404.tsx @@ -1,15 +1,19 @@ import React from "https://esm.sh/react"; -import { Head } from "https://deno.land/x/aleph/mod.ts"; - -import GoogleAnalyticsScript from "./components/google-analytics-script.tsx"; +import { Head, Scripts } from "https://deno.land/x/aleph/mod.ts"; export default function App404() { return ( <> - + ); diff --git a/app.tsx b/app.tsx index 3021518..2e5c04c 100644 --- a/app.tsx +++ b/app.tsx @@ -1,8 +1,6 @@ import React, { ComponentType } from "https://esm.sh/react"; -import { Head } from "https://deno.land/x/aleph/mod.ts"; - -import GoogleAnalyticsScript from "./components/google-analytics-script.tsx"; +import { Head, Scripts } from "https://deno.land/x/aleph/mod.ts"; export default function App( { Page, pageProps }: { Page: ComponentType; pageProps: any }, @@ -12,7 +10,13 @@ export default function App( Hossam Magdy - + diff --git a/components/google-analytics-script.tsx b/components/google-analytics-script.tsx deleted file mode 100644 index 8d7e5a5..0000000 --- a/components/google-analytics-script.tsx +++ /dev/null @@ -1,21 +0,0 @@ -import React from "https://esm.sh/react"; - -export default function GoogleAnalyticsScript() { - return <> - - - ; -}