Switched to react scan script

This commit is contained in:
2025-09-01 00:10:09 +02:00
parent 6cf2f2eea1
commit 27dca3709c
4 changed files with 10 additions and 171 deletions

View File

@@ -1,14 +1,15 @@
import { ReactScan } from "@/components/ReactScan"
import { ReactNode } from "react"
import "./globals.css"
import ThemeProvider from "@/components/ThemeProvider"
import { Toaster } from "@/components/ui/sonner"
import { ReactNode } from "react"
export default function RootLayout({ children }: Readonly<{ children: ReactNode }>) {
return (
<html lang="en" suppressHydrationWarning>
{process.env.NODE_ENV === "development" && <ReactScan />}
<head>
{/* eslint-disable-next-line @next/next/no-sync-scripts */}
{process.env.NODE_ENV === "development" && <script src="https://unpkg.com/react-scan/dist/auto.global.js" />}
</head>
<body className="antialiased">
<ThemeProvider>
{children}

View File

@@ -1,14 +0,0 @@
"use client"
import { JSX, useEffect } from "react"
import { scan } from "react-scan"
export function ReactScan(): JSX.Element {
useEffect(() => {
scan({
enabled: true
})
}, [])
return <></>
}