diff --git a/apps/app/src/pages/_app.tsx b/apps/app/src/pages/_app.tsx index 774dc2a6193..b66767f3792 100644 --- a/apps/app/src/pages/_app.tsx +++ b/apps/app/src/pages/_app.tsx @@ -9,8 +9,9 @@ import { type AppProps, type NextWebVitalsMetric } from 'next/app' import dynamic from 'next/dynamic' import Head from 'next/head' import { useRouter } from 'next/router' +import Script from 'next/script' import { type Session } from 'next-auth' -import { appWithTranslation, type UserConfig } from 'next-i18next' +import { appWithTranslation } from 'next-i18next' import { DefaultSeo, type DefaultSeoProps } from 'next-seo' import { GoogleAnalytics } from 'nextjs-google-analytics' @@ -51,27 +52,24 @@ export function reportWebVitals(stats: NextWebVitalsMetric) { appEvent.webVitals(stats) } +const PageContent = ({ Component, ...pageProps }: AppPropsWithGridSwitch) => { + const router = useRouter() + const autoResetState = Component.autoResetState ? { key: router.asPath } : {} + return Component.omitGrid ? ( + + ) : ( + + + + ) +} + const MyApp = (appProps: AppPropsWithGridSwitch) => { const { - Component, - pageProps: { session, ...pageProps }, + pageProps: { session }, } = appProps - - const router = useRouter() - const { isMobile, isTablet } = useScreenSize() - const autoResetState = Component.autoResetState ? { key: router.asPath } : {} - - const PageContent = () => - Component.omitGrid ? ( - - ) : ( - - - - ) - return ( <> @@ -80,9 +78,14 @@ const MyApp = (appProps: AppPropsWithGridSwitch) => { + - + {(isMobile || isTablet) && }