From d85ea6861c7110676fd403f3fffa59c0959f3e46 Mon Sep 17 00:00:00 2001 From: swve Date: Sat, 8 Jun 2024 12:23:04 +0100 Subject: [PATCH] feat: init umami --- apps/web/app/auth/options.ts | 2 +- apps/web/app/layout.tsx | 3 +++ apps/web/middleware.ts | 3 ++- apps/web/next.config.js | 17 ++++++++++++++--- 4 files changed, 20 insertions(+), 5 deletions(-) diff --git a/apps/web/app/auth/options.ts b/apps/web/app/auth/options.ts index 04553622..b953fd6a 100644 --- a/apps/web/app/auth/options.ts +++ b/apps/web/app/auth/options.ts @@ -9,7 +9,7 @@ import { getResponseMetadata } from '@services/utils/ts/requests' import CredentialsProvider from 'next-auth/providers/credentials' import GoogleProvider from 'next-auth/providers/google' -const isDevEnv = LEARNHOUSE_TOP_DOMAIN == 'localhost' ? true : false +export const isDevEnv = LEARNHOUSE_TOP_DOMAIN == 'localhost' ? true : false export const nextAuthOptions = { debug: true, diff --git a/apps/web/app/layout.tsx b/apps/web/app/layout.tsx index 93dcdc2d..2ae9dd48 100644 --- a/apps/web/app/layout.tsx +++ b/apps/web/app/layout.tsx @@ -4,6 +4,8 @@ import StyledComponentsRegistry from '../components/Utils/libs/styled-registry' import { motion } from 'framer-motion' import { SessionProvider } from 'next-auth/react' import LHSessionProvider from '@components/Contexts/LHSessionContext' +import { isDevEnv } from './auth/options' +import Script from 'next/script' export default function RootLayout({ children, @@ -19,6 +21,7 @@ export default function RootLayout({ + {isDevEnv ? '' :