Skip to content

Commit 194f396

Browse files
committed
fix favicon + react scan
1 parent eaef7c2 commit 194f396

File tree

4 files changed

+9
-12
lines changed

4 files changed

+9
-12
lines changed
Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
1+
// path/to/ReactScanComponent
2+
13
'use client';
24
// react-scan must be imported before react
35
import { scan } from 'react-scan/all-environments';
4-
import { useEffect } from 'react';
6+
import { JSX, useEffect } from 'react';
57

6-
export function ReactScan() {
8+
export function ReactScan(): JSX.Element {
79
useEffect(() => {
8-
setTimeout(() => {
9-
scan({ enabled: true });
10-
}, 1000);
10+
scan({ enabled: true });
1111
}, []);
1212

13-
return null;
13+
return <></>;
1414
}

examples/demo/src/app/layout.tsx

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ import { bodyAttributes } from '@zero-ui/attributes';
33
import './globals.css';
44
import { TopBarV2 } from './components/TopBar';
55
import { Analytics } from '@vercel/analytics/next';
6-
import Script from 'next/script';
76

87
export const metadata = { title: 'React Zero UI Demo', description: 'React Zero UI Demo', alternates: { canonical: process.env.NEXT_PUBLIC_URL } };
98

@@ -13,10 +12,8 @@ export default function RootLayout({ children }: Readonly<{ children: React.Reac
1312
<body
1413
className="flex h-full w-full items-center justify-center bg-gray-100 antialiased"
1514
{...bodyAttributes}>
16-
<Script
17-
strategy="lazyOnload"
18-
src="https://unpkg.com/react-scan/dist/auto.global.js"
19-
/>
15+
<script src="https://unpkg.com/react-scan/dist/auto.global.js" />
16+
2017
<ReactScan />
2118
<TopBarV2 />
2219
{children}

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"workspaces": [
66
"packages/*"
77
],
8-
"packageManager": "pnpm@10.12.1",
8+
"packageManager": "pnpm@10.13.1+sha512.37ebf1a5c7a30d5fabe0c5df44ee8da4c965ca0c5af3dbab28c3a1681b70a256218d05c81c9c0dcf767ef6b8551eb5b960042b9ed4300c59242336377e01cfad",
99
"references": [
1010
{
1111
"path": "packages/core"

0 commit comments

Comments
 (0)