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'
21
21
22
22
import * as React from 'react'
23
23
import * as Fathom from 'fathom-client'
24
+ import type { AppProps } from 'next/app'
24
25
import { useRouter } from 'next/router'
25
26
import { ThemeProvider } from 'next-themes'
26
27
import posthog from 'posthog-js'
27
28
28
29
import { 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 ) {
32
39
bootstrap ( )
33
40
}
34
41
35
- export default function App ( { Component, pageProps } ) {
42
+ export default function App ( { Component, pageProps } : AppProps ) {
36
43
const router = useRouter ( )
37
44
38
45
React . useEffect ( ( ) => {
You can’t perform that action at this time.
0 commit comments