2022-01-02 17:16:15 +01:00
|
|
|
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'
|
2023-01-29 16:44:02 +01:00
|
|
|
import { freeSewingConfig } from 'site/freesewing.config.mjs'
|
2022-01-02 17:16:15 +01:00
|
|
|
|
2022-12-28 21:04:30 +01:00
|
|
|
Bugsnag.start({
|
2023-01-09 21:37:05 +01:00
|
|
|
apiKey: freeSewingConfig.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>
|
|
|
|
<Component {...pageProps} bugsnag={Bugsnag} />
|
|
|
|
</ErrorBoundary>
|
|
|
|
)
|
2022-01-02 17:16:15 +01:00
|
|
|
|
2022-05-21 19:26:43 +02:00
|
|
|
export default appWithTranslation(FreeSewingOrg)
|