Skip to content

Commit

Permalink
fix layout
Browse files Browse the repository at this point in the history
  • Loading branch information
icco committed Mar 21, 2024
1 parent b9a51cf commit 0bf7434
Showing 1 changed file with 16 additions and 12 deletions.
28 changes: 16 additions & 12 deletions src/app/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,25 +34,29 @@ export default function RootLayout({
}: {
children: React.ReactNode
}) {
let meticulousScript = <></>
if (
process.env.NODE_ENV === "development" ||
process.env.VERCEL_ENV === "preview"
) {
meticulousScript = (
// eslint-disable-next-line @next/next/no-sync-scripts
<script
data-project-id="HRQOYGM9Ui3pdObThsWrs6RCZ38sO96OXPNAeMSu"
data-is-production-environment="false"
src="https://snippet.meticulous.ai/v1/meticulous.js"
/>
)
}
return (
<html
lang="en"
className={`${roboto.variable} ${robotoSlab.variable} ${robotoMono.variable}`}
suppressHydrationWarning
>
<head>
{(process.env.NODE_ENV === "development" ||
process.env.VERCEL_ENV === "preview") && (
// eslint-disable-next-line @next/next/no-sync-scripts
<script
data-project-id="HRQOYGM9Ui3pdObThsWrs6RCZ38sO96OXPNAeMSu"
data-is-production-environment="false"
src="https://snippet.meticulous.ai/v1/meticulous.js"
/>
)}
</head>
<head>{meticulousScript}</head>
<body>
<ThemeProvider attribute="class">
<ThemeProvider attribute="class" defaultTheme="nord">
<Header />
<main>{children}</main>
<Footer />
Expand Down

0 comments on commit 0bf7434

Please sign in to comment.