Skip to content

Commit

Permalink
Merge pull request #705 from Amsterdam-Music-Lab/fix/strict-mode
Browse files Browse the repository at this point in the history
only activate React StrictMode when Docker variable is True
  • Loading branch information
BeritJanssen authored Jan 9, 2024
2 parents 7279e13 + f687944 commit 58c5b8f
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions .env.dist
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,4 @@ REACT_APP_HTML_OG_TITLE=Amsterdam Music Lab Experiment # optional: information f
REACT_APP_HTML_OG_URL= # optional: information for web crawlers
REACT_APP_HTML_BODY_CLASS= # optional: assign a css class to the <body> tag in index.html, for custom styling
REACT_APP_SENTRY_DSN= # optional: link to sentry instance, e.g. https://xxx@xxx.ingest.sentry.io/xxx
REACT_APP_STRICT= # optional: use StrictMode for development
1 change: 1 addition & 0 deletions docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ services:
- REACT_APP_HTML_OG_URL=${REACT_APP_HTML_OG_URL}
- REACT_APP_HTML_BODY_CLASS=${REACT_APP_HTML_BODY_CLASS}
- REACT_APP_SENTRY_DSN=${REACT_APP_SENTRY_DSN}
- REACT_APP_STRICT=${REACT_APP_STRICT}
ports:
- 3000:3000
command: sh -c "yarn scss && yarn start"
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ initWebAudioListener();
const container = document.getElementById("root");
const root = createRoot(container);
root.render(
process.env.NODE_ENV === "development" ? (
process.env.REACT_APP_STRICT === true ? (
<StrictMode>
<App />
</StrictMode>
Expand Down

0 comments on commit 58c5b8f

Please sign in to comment.