diff --git a/src/app/layout.tsx b/src/app/layout.tsx index 81b56377d..51ad5b5be 100644 --- a/src/app/layout.tsx +++ b/src/app/layout.tsx @@ -5,9 +5,10 @@ import '@radix-ui/themes/styles.css'; import { config } from 'dotenv'; import { Roboto_Flex } from 'next/font/google'; import { usePathname } from 'next/navigation'; -import { ReactNode, useEffect, useState } from 'react'; +import { ReactNode, Suspense, useEffect, useState } from 'react'; import { Footer } from '../components/Footer'; import { Google } from '../components/Google'; +import { Loader } from '../components/Loader'; import Navbar from '../components/Navbar'; import isDev from '../core/blitzkrieg/isDev'; import { isLocalhost } from '../core/blitzkrieg/isLocalhost'; @@ -31,6 +32,7 @@ export default function RootLayout({ children }: RootLayoutProps) { const pathname = usePathname(); const isEmbed = pathname.split('/')[1] === 'embeds'; const isRoot = pathname === '/'; + const darkMode = useApp((state) => state.darkMode); const [showDevBuildAlert, setShowDevBuildAlert] = useState(false); const isFullScreen = useFullScreen(); @@ -46,11 +48,15 @@ export default function RootLayout({ children }: RootLayoutProps) { return ( - {isRoot && Blitzkrieg} - + {isRoot && ( + <> + Blitzkrieg + + + )} @@ -64,7 +70,7 @@ export default function RootLayout({ children }: RootLayoutProps) { }} > - {children} + + + + } + > + {children} + {!isEmbed && !isFullScreen &&