Open History to see the last commit
1import React from 'react'
2import '@docsearch/react/dist/style.css'
3import '../styles/index.css'
4import Head from 'next/head'
5import { SearchProvider } from 'components/useSearch'
6β
7function loadScript(src, attrs = {}) {
8 if (typeof document !== 'undefined') {
9 const script = document.createElement('script')
10 script.async = true
11 script.defer = true
12 Object.keys(attrs).forEach(attr => script.setAttribute(attr, attrs[attr]))
13 script.src = src
14 document.body.appendChild(script)
15 }
16}
17β
18function MyApp({ Component, pageProps }) {
19 React.useEffect(() => {
20 loadScript('https://buttons.github.io/buttons.js')
21 }, [])
22β
23 return (
24 <>
25 <Head>
26 <link
27 href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap"
28 rel="stylesheet"
29 />
30 </Head>
31 {/* eslint-disable-next-line jsx-a11y/alt-text */}
32 <img
33 src="https://static.scarf.sh/a.png?x-pxid=c03d3ddd-b47e-4e26-a9b2-9df68b2ac970"
34 className="h-0"
35 />
36 <SearchProvider>
37 <Component {...pageProps} />
38 </SearchProvider>
39 </>
40 )
41}
42β
43export default MyApp