Switched to react scan script
This commit is contained in:
@@ -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}
|
||||
|
||||
@@ -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 <></>
|
||||
}
|
||||
Reference in New Issue
Block a user