Skip to content

Commit

Permalink
fix(sentry): added sentry
Browse files Browse the repository at this point in the history
  • Loading branch information
HoseaCodes committed Nov 6, 2021
1 parent d9fa435 commit e9626f2
Show file tree
Hide file tree
Showing 5 changed files with 304 additions and 5 deletions.
277 changes: 277 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
"dependencies": {
"@material-ui/core": "^4.12.3",
"@material-ui/icons": "^4.11.2",
"@sentry/react": "^6.13.3",
"@sentry/tracing": "^6.13.3",
"@testing-library/jest-dom": "^5.14.1",
"@testing-library/react": "^11.2.7",
"@testing-library/user-event": "^12.8.3",
Expand Down Expand Up @@ -73,7 +75,6 @@
"start:stag": "env-cmd -e staging react-scripts start",
"start:prod": "env-cmd -e production react-scripts start",
"build:dev": "env-cmd -e dev react-scripts build",
"build:qa": "env-cmd -e testing react-scripts build",
"build:qa": "env-cmd -e staging react-scripts build",
"build:prod": "env-cmd -e production react-scripts build",
"build": "react-scripts build",
Expand Down
4 changes: 3 additions & 1 deletion src/App.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import React, { Component } from 'react';
import * as Sentry from "@sentry/react";
import Home from './Pages/Home/Home'
import Projects from './Pages/Projects/Projects'
import About from './Pages/About/About'
Expand All @@ -17,7 +18,7 @@ import Register from './Pages/Auth/register';
import Profile from './Pages/User/profile';
import Editprofile from './Pages/User/editProfile';

export default class App extends Component {
class App extends Component {

render() {

Expand Down Expand Up @@ -49,3 +50,4 @@ export default class App extends Component {
}


export default Sentry.withProfiler(App);
6 changes: 3 additions & 3 deletions src/Utils/scroll.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@

window.addEventListener('scroll', () => {
document.body.style.setProperty('--scroll', window.pageYOffset / (document.body.offsetHeight - window.innerHeight));
}, false);
// window.addEventListener('scroll', () => {
// document.body.style.setProperty('--scroll', window.pageYOffset / (document.body.offsetHeight - window.innerHeight));
// }, false);
19 changes: 19 additions & 0 deletions src/index.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,28 @@
import React from 'react';
import ReactDOM from 'react-dom';
import { Router } from 'react-router-dom';
import { createBrowserHistory } from 'history';
import * as Sentry from "@sentry/react";
import { Integrations } from "@sentry/tracing";
import App from './App';
import 'bootstrap/dist/css/bootstrap.min.css';
import * as serviceWorker from './serviceWorker';

const history = createBrowserHistory();

// Sentry.init({
// dsn: "https://[email protected]/6007465",
// integrations: [new Integrations.BrowserTracing({
// tracingOrigins: ["localhost", "www.hoseacodes.com", /^\//],
// routingInstrumentation: Sentry.reactRouterV5Instrumentation(history),
// })],

// // Set tracesSampleRate to 1.0 to capture 100%
// // of transactions for performance monitoring.
// // We recommend adjusting this value in production
// tracesSampleRate: 1.0,
// });

ReactDOM.render(
<React.StrictMode>
<App />
Expand Down

0 comments on commit e9626f2

Please sign in to comment.