Skip to content

Commit

Permalink
Merge pull request #723 from woowacourse-teams/develop
Browse files Browse the repository at this point in the history
release 1.9.0
  • Loading branch information
InKyoJeong authored Oct 27, 2022
2 parents 9d1d8e1 + 8eb95b1 commit 8fc6e78
Show file tree
Hide file tree
Showing 5 changed files with 109 additions and 0 deletions.
93 changes: 93 additions & 0 deletions front/package-lock.json

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

2 changes: 2 additions & 0 deletions front/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@
"webpack-dev-server": "^4.9.3"
},
"dependencies": {
"@sentry/react": "^7.16.0",
"@sentry/tracing": "^7.16.0",
"axios": "^0.27.2",
"react": "^18.2.0",
"react-dom": "^18.2.0",
Expand Down
8 changes: 8 additions & 0 deletions front/src/index.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import { createRoot } from 'react-dom/client';
import { BrowserRouter } from 'react-router-dom';
import { ThemeProvider } from 'styled-components';
import * as Sentry from '@sentry/react';
import { BrowserTracing } from '@sentry/tracing';

import App from './App';
import GlobalStyle from '@styles/GlobalStyle';
Expand All @@ -23,6 +25,12 @@ import worker from './mocks/browser';
// }
// };

Sentry.init({
dsn: process.env.SENTRY_DSN,
integrations: [new BrowserTracing()],
tracesSampleRate: 1.0,
});

const root = createRoot(document.getElementById('root') as HTMLElement);
root.render(
<ThemeProvider theme={theme}>
Expand Down
1 change: 1 addition & 0 deletions front/src/pages/CrewMain/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ const CrewMain = () => {
image: '',
});
const [isLoading, setIsLoading] = useState(false);

const handleClickCard = (e: React.MouseEvent, id: number, image: string, isPokable: boolean) => {
const target = (e.target as HTMLImageElement).id;
if (target === 'request') {
Expand Down
5 changes: 5 additions & 0 deletions front/src/utils/logError.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
import * as Sentry from '@sentry/react';

const logError = (error: Error) => {
if (process.env.NODE_ENV === 'development') {
console.error(error);
return;
}

Sentry.captureException(error);
};

export { logError };

0 comments on commit 8fc6e78

Please sign in to comment.