1
0
Fork 0
freesewing/sites/org/pages/_app.mjs

26 lines
738 B
JavaScript
Raw Normal View History

import 'shared/styles/globals.css'
2022-05-21 19:26:43 +02:00
import { appWithTranslation } from 'next-i18next'
2022-12-28 21:04:30 +01:00
import React from 'react'
import Bugsnag from '@bugsnag/js'
import BugsnagPluginReact from '@bugsnag/plugin-react'
import { siteConfig } from 'site/site.config.mjs'
import { ContextWrapper } from 'shared/components/wrappers/context.mjs'
2022-12-28 21:04:30 +01:00
Bugsnag.start({
apiKey: siteConfig.bugsnag.key,
2022-12-28 21:04:30 +01:00
collectUserIp: false,
plugins: [new BugsnagPluginReact()],
})
const ErrorBoundary = Bugsnag.getPlugin('react').createErrorBoundary(React)
const FreeSewingOrg = ({ Component, pageProps }) => (
<ErrorBoundary>
<ContextWrapper>
<Component {...pageProps} />
</ContextWrapper>
2022-12-28 21:04:30 +01:00
</ErrorBoundary>
)
2022-05-21 19:26:43 +02:00
export default appWithTranslation(FreeSewingOrg)