75 lines
1.9 KiB
TypeScript
75 lines
1.9 KiB
TypeScript
import { ThemeProvider } from "next-themes";
|
|
import Script from "next/script";
|
|
import "./globals.css";
|
|
import { Toaster } from "../components/ui/sonner";
|
|
import { TooltipProvider } from "../components/ui/tooltip";
|
|
import { baseMetaData } from "./metadata";
|
|
import { BotIdClient } from "botid/client";
|
|
import { webEnv } from "@opencut/env/web";
|
|
import { Inter } from "next/font/google";
|
|
|
|
const siteFont = Inter({ subsets: ["latin"] });
|
|
|
|
export const metadata = baseMetaData;
|
|
|
|
const protectedRoutes = [
|
|
{
|
|
path: "/none",
|
|
method: "GET",
|
|
},
|
|
];
|
|
|
|
export default function RootLayout({
|
|
children,
|
|
}: Readonly<{
|
|
children: React.ReactNode;
|
|
}>) {
|
|
return (
|
|
<html lang="en" suppressHydrationWarning>
|
|
<head>
|
|
<BotIdClient protect={protectedRoutes} />
|
|
{process.env.NODE_ENV === "development" && (
|
|
<>
|
|
<Script
|
|
src="//unpkg.com/react-scan/dist/auto.global.js"
|
|
crossOrigin="anonymous"
|
|
strategy="beforeInteractive"
|
|
/>
|
|
|
|
{/* code to figma */}
|
|
{/* <script
|
|
dangerouslySetInnerHTML={{
|
|
__html: `(function(){var s=document.createElement('script');s.src='https://mcp.figma.com/mcp/html-to-design/capture.js';document.head.appendChild(s);})();`,
|
|
}}
|
|
/> */}
|
|
</>
|
|
)}
|
|
</head>
|
|
<body className={`${siteFont.className} font-sans antialiased`}>
|
|
<ThemeProvider
|
|
attribute="class"
|
|
defaultTheme="system"
|
|
disableTransitionOnChange={true}
|
|
>
|
|
<TooltipProvider>
|
|
<Toaster />
|
|
<Script
|
|
src="https://cdn.databuddy.cc/databuddy.js"
|
|
strategy="afterInteractive"
|
|
async
|
|
data-client-id="UP-Wcoy5arxFeK7oyjMMZ"
|
|
data-disabled={webEnv.NODE_ENV === "development"}
|
|
data-track-attributes={false}
|
|
data-track-errors={true}
|
|
data-track-outgoing-links={false}
|
|
data-track-web-vitals={false}
|
|
data-track-sessions={false}
|
|
/>
|
|
{children}
|
|
</TooltipProvider>
|
|
</ThemeProvider>
|
|
</body>
|
|
</html>
|
|
);
|
|
}
|