summaryrefslogtreecommitdiff
path: root/opendc-web/opendc-web-ui/src/index.js
diff options
context:
space:
mode:
authorFabian Mastenbroek <mail.fabianm@gmail.com>2021-05-09 13:12:21 +0200
committerFabian Mastenbroek <mail.fabianm@gmail.com>2021-05-09 13:12:21 +0200
commitf79c0872ddfcbe02a7bcc498b4a9d5d202caccd2 (patch)
tree7ff6132f8b7e283a015eccb8ffe6034930f078ed /opendc-web/opendc-web-ui/src/index.js
parent33e425279f171539205fcda20c6817e9f8e02033 (diff)
ui: Update runtime variable workaround
This change updates the workaround used to access runtime variables in the React frontend, in order to improve the ergonimics when using the development mode of CRA (Create React App).
Diffstat (limited to 'opendc-web/opendc-web-ui/src/index.js')
-rw-r--r--opendc-web/opendc-web-ui/src/index.js5
1 files changed, 4 insertions, 1 deletions
diff --git a/opendc-web/opendc-web-ui/src/index.js b/opendc-web/opendc-web-ui/src/index.js
index bddf0b0e..7f60098d 100644
--- a/opendc-web/opendc-web-ui/src/index.js
+++ b/opendc-web/opendc-web-ui/src/index.js
@@ -6,13 +6,16 @@ import { Provider } from 'react-redux'
import { setupSocketConnection } from './api/socket'
import './index.sass'
import Routes from './routes'
+import config from './config'
import configureStore from './store/configure-store'
setupSocketConnection(() => {
const store = configureStore()
+ console.log('test', config)
+
// Initialize Sentry if the user has configured a DSN
- const dsn = window.$$env['SENTRY_DSN']
+ const dsn = config['SENTRY_DSN']
if (dsn) {
Sentry.init({
environment: process.env.NODE_ENV,