'use client'; import { AlertDialog, Button, Flex, Theme } from '@radix-ui/themes'; import '@radix-ui/themes/styles.css'; import { config } from 'dotenv'; import { Roboto_Flex } from 'next/font/google'; import { usePathname } from 'next/navigation'; import { ReactNode, Suspense, useEffect, useState } from 'react'; import { Footer } from '../components/Footer'; import { Loader } from '../components/Loader'; import Navbar from '../components/Navbar'; import { Party3 } from '../components/Party3'; import isDev from '../core/blitzkit/isDev'; import { isLocalhost } from '../core/blitzkit/isLocalhost'; import { useApp } from '../stores/app'; config(); const DEV_BUILD_AGREEMENT_COOLDOWN = 8 * 24 * 60 * 60 * 1000; interface RootLayoutProps { children: ReactNode; } const robotoFlex = Roboto_Flex({ subsets: ['latin'], display: 'swap', }); 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); useEffect(() => { setShowDevBuildAlert( isDev() && !isLocalhost() && Date.now() - useApp.getState().devBuildAgreementTime >= DEV_BUILD_AGREEMENT_COOLDOWN, ); }, []); return ( {isRoot && ( <> BlitzKit )} {!isEmbed && } Experimental version! This version may have a lot of issues. Report issues to{' '} the official Discord server . Also consider using{' '} the more stable release version . You will be asked again in 8 days. } > {children} {!isEmbed &&