Created
December 7, 2020 08:22
-
-
Save dipeshhkc/b66c4e26ee2daf3c9684e2e1b514b853 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { useEffect } from 'react'; | |
import { analytics } from '../utils/firebase'; | |
const MyApp = ({ Component, pageProps }) => { | |
useEffect(() => { | |
if (process.env.NODE_ENV === 'production') { | |
analytics(); | |
} | |
}, []) | |
return <Component {...pageProps} />; | |
}; | |
export default MyApp; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment