This repository was archived by the owner on Dec 26, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +11
-3
lines changed Expand file tree Collapse file tree 1 file changed +11
-3
lines changed Original file line number Diff line number Diff line change 1
- import React from 'react' ;
1
+ import React , { ReactNode } from 'react' ;
2
2
import Head from 'next/head' ;
3
3
import { appWithTranslation } from 'next-i18next' ;
4
4
import { ChakraProvider } from '@chakra-ui/react' ;
@@ -13,6 +13,14 @@ import PlausibleProvider from 'next-plausible';
13
13
14
14
const socialBanner = `${ DEVELOPER_DAO_WEBSITE } /social-banner.png` ;
15
15
16
+ const Plausible = ( { children } : { children : ReactNode } ) => {
17
+ return process . env . NEXT_PUBLIC_VERCEL_ENV === 'production' ? (
18
+ < PlausibleProvider domain = "developerdao.com" > { children } </ PlausibleProvider >
19
+ ) : (
20
+ < > { children } </ >
21
+ ) ;
22
+ } ;
23
+
16
24
function SEO ( ) {
17
25
const { t } = useTranslation ( ) ;
18
26
@@ -135,11 +143,11 @@ user's mobile device or desktop. See https://developers.google.com/web/fundament
135
143
const App = ( { Component, pageProps } : AppProps ) => (
136
144
< >
137
145
< SEO />
138
- < PlausibleProvider domain = "developerdao.com" >
146
+ < Plausible >
139
147
< ChakraProvider theme = { theme } >
140
148
< Component { ...pageProps } />
141
149
</ ChakraProvider >
142
- </ PlausibleProvider >
150
+ </ Plausible >
143
151
</ >
144
152
) ;
145
153
You can’t perform that action at this time.
0 commit comments