Skip to content

Commit 0b56e6f

Browse files
committed
extract SENTRY_DSN
1 parent 05744ce commit 0b56e6f

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

frontend/src/Feedback.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ import Popup from "reactjs-popup";
99
import {FontAwesomeIcon} from "@fortawesome/react-fontawesome";
1010
import {faBug} from "@fortawesome/free-solid-svg-icons";
1111

12+
const SENTRY_DSN = process.env.REACT_APP_SENTRY_DSN;
13+
1214

1315
const FeedbackModal = ({close}) => {
1416
const email = useInput(bookState.user.email || "", {
@@ -63,7 +65,7 @@ ${description.value.trim()}`;
6365
},
6466
{
6567
headers: {
66-
Authorization: 'DSN ' + process.env.REACT_APP_SENTRY_DSN,
68+
Authorization: 'DSN ' + SENTRY_DSN,
6769
}
6870
}
6971
);
@@ -114,7 +116,7 @@ const feedbackContentStyle = {
114116
}
115117

116118
export function FeedbackMenuButton() {
117-
if (!process.env.REACT_APP_SENTRY_DSN) {
119+
if (!SENTRY_DSN) {
118120
return null;
119121
}
120122
return <p>

0 commit comments

Comments
 (0)