Skip to content

Commit 9b6a1f7

Browse files
committed
disable react-scan in prod
1 parent eee3233 commit 9b6a1f7

1 file changed

Lines changed: 7 additions & 5 deletions

File tree

apps/web/src/app/layout.tsx

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,13 @@ export default function RootLayout({
2828
<html lang="en" suppressHydrationWarning>
2929
<head>
3030
<BotIdClient protect={protectedRoutes} />
31-
<Script
32-
src="//unpkg.com/react-scan/dist/auto.global.js"
33-
crossOrigin="anonymous"
34-
strategy="beforeInteractive"
35-
/>
31+
{process.env.NODE_ENV === "development" && (
32+
<Script
33+
src="//unpkg.com/react-scan/dist/auto.global.js"
34+
crossOrigin="anonymous"
35+
strategy="beforeInteractive"
36+
/>
37+
)}
3638
</head>
3739
<body className={`${siteFont.className} font-sans antialiased`}>
3840
<ThemeProvider

0 commit comments

Comments
 (0)