diff --git a/resources/scripts/components/App.tsx b/resources/scripts/components/App.tsx index ada645f1b..c4defa8ae 100644 --- a/resources/scripts/components/App.tsx +++ b/resources/scripts/components/App.tsx @@ -1,5 +1,6 @@ -import React, { useEffect } from 'react'; -import ReactGA from 'react-ga'; +// import React, { useEffect } from 'react'; +// import ReactGA from 'react-ga'; +import React from 'react'; import { hot } from 'react-hot-loader/root'; import { BrowserRouter, Route, Switch } from 'react-router-dom'; import { StoreProvider } from 'easy-peasy'; @@ -13,7 +14,8 @@ import ProgressBar from '@/components/elements/ProgressBar'; import NotFound from '@/components/screens/NotFound'; import tw from 'twin.macro'; import GlobalStylesheet from '@/assets/css/GlobalStylesheet'; -import AdminRouter from '@/routers/AdminRouter'; + +const ChunkedAdminRouter = lazy(() => import(/* webpackChunkName: "admin" */'@/routers/AdminRouter')); interface ExtendedWindow extends Window { SiteConfiguration?: SiteSettings; @@ -50,10 +52,10 @@ const App = () => { store.getActions().settings.setSettings(SiteConfiguration!); } - useEffect(() => { + /* useEffect(() => { ReactGA.initialize(SiteConfiguration!.analytics); ReactGA.pageview(location.pathname); - }, []); + }, []); */ return ( <> @@ -64,13 +66,15 @@ const App = () => {