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 loadScript('https://tanstack.ck.page/e394781e7a/index.js', {
22 'data-uid': 'e394781e7a',
23 })
24 }, [])
25β
26 return (
27 <>
28 <Head>
29 <link
30 href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap"
31 rel="stylesheet"
32 />
33 <style
34 dangerouslySetInnerHTML={{
35 __html: `
36 @media (max-width: 390px) {
37 .formkit-slide-in {
38 display: none;
39 }
40 }
41 @media (max-height: 740px) {
42 .formkit-slide-in {
43 display: none;
44 }
45 }
46 `,
47 }}
48 />
49 </Head>
50 {/* eslint-disable-next-line jsx-a11y/alt-text */}
51 <img src="https://static.scarf.sh/a.png?x-pxid=c03d3ddd-b47e-4e26-a9b2-9df68b2ac970" />
52 <SearchProvider>
53 <Component {...pageProps} />
54 </SearchProvider>
55 </>
56 )
57}
58β
59export default MyApp