2021-06-19 09:00:44 +00:00
|
|
|
import useGtag from 'hooks/useGtag'
|
2021-06-29 19:48:06 +00:00
|
|
|
import Head from 'next/head'
|
2021-06-03 16:13:23 +00:00
|
|
|
import { AppProps } from 'next/app'
|
2021-07-14 08:04:07 +00:00
|
|
|
import { globalStyles, dark, light } from 'styles'
|
2021-06-19 10:22:23 +00:00
|
|
|
import { Provider } from 'next-auth/client'
|
2021-07-07 12:46:46 +00:00
|
|
|
import { init } from 'utils/sentry'
|
2021-06-21 21:35:28 +00:00
|
|
|
import 'styles/globals.css'
|
2021-07-14 08:04:07 +00:00
|
|
|
import { ThemeProvider } from 'next-themes'
|
2021-05-09 12:03:39 +00:00
|
|
|
|
2021-07-07 12:46:46 +00:00
|
|
|
init()
|
|
|
|
|
2021-06-21 21:35:28 +00:00
|
|
|
function MyApp({ Component, pageProps }: AppProps): JSX.Element {
|
2021-05-09 12:03:39 +00:00
|
|
|
globalStyles()
|
2021-06-20 12:35:47 +00:00
|
|
|
|
2021-06-19 09:00:44 +00:00
|
|
|
useGtag()
|
|
|
|
|
2021-06-19 10:22:23 +00:00
|
|
|
return (
|
2021-06-29 19:48:06 +00:00
|
|
|
<>
|
|
|
|
<Head>
|
|
|
|
<title>tldraw</title>
|
|
|
|
<meta
|
|
|
|
name="viewport"
|
|
|
|
content="minimum-scale=1, initial-scale=1, width=device-width, shrink-to-fit=no, user-scalable=no, viewport-fit=cover"
|
|
|
|
/>
|
|
|
|
</Head>
|
2021-07-14 08:04:07 +00:00
|
|
|
<ThemeProvider
|
|
|
|
disableTransitionOnChange
|
|
|
|
attribute="class"
|
|
|
|
value={{ light: light.toString(), dark: dark.toString() }}
|
|
|
|
defaultTheme="light"
|
|
|
|
>
|
|
|
|
<Provider session={pageProps.session}>
|
|
|
|
<Component {...pageProps} />
|
|
|
|
</Provider>
|
|
|
|
</ThemeProvider>
|
2021-06-29 19:48:06 +00:00
|
|
|
</>
|
2021-06-19 10:22:23 +00:00
|
|
|
)
|
2021-05-09 12:03:39 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
export default MyApp
|