1
0
Fork 0
freesewing/sites/org/pages/_app.js
2023-01-09 21:10:41 +01:00

22 lines
624 B
JavaScript

import 'shared/styles/globals.css'
import { appWithTranslation } from 'next-i18next'
import React from 'react'
import Bugsnag from '@bugsnag/js'
import BugsnagPluginReact from '@bugsnag/plugin-react'
import process from 'process'
Bugsnag.start({
apiKey: process.env.BUGSNAG_API_KEY,
collectUserIp: false,
plugins: [new BugsnagPluginReact()],
})
const ErrorBoundary = Bugsnag.getPlugin('react').createErrorBoundary(React)
const FreeSewingOrg = ({ Component, pageProps }) => (
<ErrorBoundary>
<Component {...pageProps} bugsnag={Bugsnag} />
</ErrorBoundary>
)
export default appWithTranslation(FreeSewingOrg)