Files
OpenCut/apps/web/src/app/layout.tsx
T

75 lines
1.9 KiB
TypeScript
Raw Normal View History

2025-06-22 10:02:50 +02:00
import { ThemeProvider } from "next-themes";
2025-06-22 18:39:59 +02:00
import Script from "next/script";
2025-06-22 10:02:50 +02:00
import "./globals.css";
import { Toaster } from "../components/ui/sonner";
import { TooltipProvider } from "../components/ui/tooltip";
2025-06-25 20:14:55 +05:30
import { baseMetaData } from "./metadata";
2025-07-16 01:00:40 +01:00
import { BotIdClient } from "botid/client";
2026-01-31 00:20:04 +01:00
import { webEnv } from "@opencut/env/web";
import { Inter } from "next/font/google";
const siteFont = Inter({ subsets: ["latin"] });
2025-06-22 10:02:50 +02:00
2025-06-25 20:14:55 +05:30
export const metadata = baseMetaData;
2025-06-22 10:02:50 +02:00
2025-07-16 01:00:40 +01:00
const protectedRoutes = [
2026-01-31 00:20:04 +01:00
{
path: "/none",
method: "GET",
},
2025-07-16 01:00:40 +01:00
];
2025-06-22 10:02:50 +02:00
export default function RootLayout({
2026-01-31 00:20:04 +01:00
children,
2025-06-22 10:02:50 +02:00
}: Readonly<{
2026-01-31 00:20:04 +01:00
children: React.ReactNode;
2025-06-22 10:02:50 +02:00
}>) {
2026-01-31 00:20:04 +01:00
return (
<html lang="en" suppressHydrationWarning>
<head>
<BotIdClient protect={protectedRoutes} />
2026-03-02 16:53:30 +01:00
{process.env.NODE_ENV === "development" && (
<>
<Script
src="//unpkg.com/react-scan/dist/auto.global.js"
crossOrigin="anonymous"
strategy="beforeInteractive"
/>
2026-03-26 13:52:30 +01:00
{/* 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);})();`,
}}
/> */}
</>
2026-03-02 16:53:30 +01:00
)}
2026-01-31 00:20:04 +01:00
</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>
);
2025-06-22 10:02:50 +02:00
}