@@ -118,7 +118,7 @@ export const App = () => {
118118 href = "https://github.com/aidenybai/react-scan#readme"
119119 className = "cta-button"
120120 >
121- View source →
121+ Get started →
122122 </ a >
123123 < p >
124124 < small >
@@ -128,169 +128,6 @@ export const App = () => {
128128 </ a >
129129 </ small >
130130 </ p >
131-
132- < div className = "installation-section" >
133- < h3 > Install</ h3 >
134- < p > Get started by adding this script to your app:</ p >
135- < div className = "code-container" >
136- < code >
137- <script
138- src="https://unpkg.com/react-scan/dist/auto.global.js"></script>
139- </ code >
140- < button
141- className = "copy-button"
142- onClick = { ( ) =>
143- copyToClipboard (
144- '<script src="https://unpkg.com/react-scan/dist/auto.global.js"></script>' ,
145- )
146- }
147- >
148- Copy
149- </ button >
150- </ div >
151- < p >
152- < small >
153- < strong > Important:</ strong > Add this before any other scripts
154- run!
155- </ small >
156- </ p >
157- < div className = "framework-instructions" >
158- < div className = "tabs" >
159- < button
160- className = { `tab-button ${ activeTab === 'nextjs-pages' ? 'active' : '' } ` }
161- onClick = { ( ) => setActiveTab ( 'nextjs-pages' ) }
162- >
163- Next.js (pages)
164- </ button >
165- < button
166- className = { `tab-button ${ activeTab === 'nextjs-app' ? 'active' : '' } ` }
167- onClick = { ( ) => setActiveTab ( 'nextjs-app' ) }
168- >
169- Next.js (app)
170- </ button >
171- < button
172- className = { `tab-button ${ activeTab === 'vite' ? 'active' : '' } ` }
173- onClick = { ( ) => setActiveTab ( 'vite' ) }
174- >
175- Other
176- </ button >
177- </ div >
178-
179- < div className = "tab-content" >
180- < div
181- className = { `tab-panel ${ activeTab === 'nextjs-pages' ? 'active' : '' } ` }
182- >
183- < h4 > Next.js (Pages Router)</ h4 >
184- < p >
185- Add script tag to < code > _document.tsx</ code > in{ ' ' }
186- < code > <head></ code > :
187- </ p >
188- < div className = "code-container" >
189- < pre
190- style = { {
191- width : '100%' ,
192- padding : '1rem' ,
193- } }
194- >
195- < code
196- dangerouslySetInnerHTML = { {
197- __html : highlight (
198- `import { Html, Head, Main, NextScript } from 'next/document'
199-
200- export default function Document() {
201- return (
202- <Html lang="en">
203- <Head>
204- <script src="https://unpkg.com/react-scan/dist/auto.global.js" async></script>
205- {/* rest of your scripts go under */}
206- </Head>
207- <body>
208- <Main />
209- <NextScript />
210- </body>
211- </Html>
212- )
213- }` . trim ( ) ,
214- ) ,
215- } }
216- > </ code >
217- </ pre >
218- </ div >
219- </ div >
220-
221- < div
222- className = { `tab-panel ${ activeTab === 'nextjs-app' ? 'active' : '' } ` }
223- >
224- < h4 > Next.js (App Router)</ h4 >
225- < p >
226- Add to script tag to < code > layout.tsx</ code > in{ ' ' }
227- < code > <head></ code > :
228- </ p >
229- < div className = "code-container" >
230- < pre
231- style = { {
232- width : '100%' ,
233- padding : '1rem' ,
234- } }
235- >
236- < code
237- dangerouslySetInnerHTML = { {
238- __html :
239- highlight ( `export default function RootLayout({
240- children,
241- }: {
242- children: React.ReactNode
243- }) {
244- return (
245- <html lang="en">
246- <head>
247- <script src="https://unpkg.com/react-scan/dist/auto.global.js" async></script>
248- {/* rest of your scripts go under */}
249- </head>
250- <body>{children}</body>
251- </html>
252- )
253- }` ) ,
254- } }
255- > </ code >
256- </ pre >
257- </ div >
258- </ div >
259-
260- < div
261- className = { `tab-panel ${ activeTab === 'vite' ? 'active' : '' } ` }
262- >
263- < h4 > Other</ h4 >
264- < p >
265- Add to < code > index.html</ code > in < code > <head></ code > :
266- </ p >
267- < div className = "code-container" >
268- < pre
269- style = { {
270- width : '100%' ,
271- padding : '1rem' ,
272- } }
273- >
274- < code
275- dangerouslySetInnerHTML = { {
276- __html : highlight ( `<!DOCTYPE html>
277- <html lang="en">
278- <head>
279- <script src="https://unpkg.com/react-scan/dist/auto.global.js"></script>
280- <!-- rest of your scripts go under -->
281- </head>
282- <body>
283- <!-- ... -->
284- </body>
285- </html>` ) ,
286- } }
287- > </ code >
288- </ pre >
289- </ div >
290- </ div >
291- </ div >
292- </ div >
293- </ div >
294131 </ div >
295132 </ div >
296133 </ TooltipContext . Provider >
0 commit comments