Skip to content

Commit

Permalink
fix broken JS
Browse files Browse the repository at this point in the history
  • Loading branch information
gh0stdotexe authored and gh0stdotexe committed Sep 12, 2023
1 parent 97fdc4d commit 69b14de
Showing 1 changed file with 30 additions and 1 deletion.
31 changes: 30 additions & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,35 @@ const app = (
</React.StrictMode>
)

if (process.env.BUGSNAG_KEY) {
Bugsnag.start({
apiKey: process.env.BUGSNAG_KEY,
plugins: [new BugsnagPluginReact()],
enabledReleaseStages: ['production', 'staging'],
releaseStage: process.env.NODE_ENV
})

const ErrorBoundary = Bugsnag.getPlugin('react')
.createErrorBoundary(React)

ReactDOM.render(
<ErrorBoundary>
{app}
</ErrorBoundary>,
document.getElementById('root')
);
}else{
ReactDOM.render(
app,
document.getElementById('root')
);
}

// If you want to start measuring performance in your app, pass a function
// to log results (for example: reportWebVitals(console.log))
// or send to an analytics endpoint. Learn more: https://bit.ly/CRA-vitals
reportWebVitals();

import { inject } from '@vercel/analytics';

inject();
inject();

0 comments on commit 69b14de

Please sign in to comment.