File tree Expand file tree Collapse file tree 1 file changed +11
-4
lines changed Expand file tree Collapse file tree 1 file changed +11
-4
lines changed Original file line number Diff line number Diff line change @@ -21,18 +21,25 @@ import 'styles/prism-theme.css'
2121
2222import * as React from 'react'
2323import * as Fathom from 'fathom-client'
24+ import type { AppProps } from 'next/app'
2425import { useRouter } from 'next/router'
2526import { ThemeProvider } from 'next-themes'
2627import posthog from 'posthog-js'
2728
2829import { bootstrap } from 'lib/bootstrap-client'
29- import { fathomId , fathomConfig , posthogId , posthogConfig } from 'lib/config'
30-
31- if ( typeof window !== 'undefined' ) {
30+ import {
31+ isServer ,
32+ fathomId ,
33+ fathomConfig ,
34+ posthogId ,
35+ posthogConfig
36+ } from 'lib/config'
37+
38+ if ( ! isServer ) {
3239 bootstrap ( )
3340}
3441
35- export default function App ( { Component, pageProps } ) {
42+ export default function App ( { Component, pageProps } : AppProps ) {
3643 const router = useRouter ( )
3744
3845 React . useEffect ( ( ) => {
You can’t perform that action at this time.
0 commit comments