diff options
| author | Fabian Mastenbroek <mail.fabianm@gmail.com> | 2021-05-09 13:12:21 +0200 |
|---|---|---|
| committer | Fabian Mastenbroek <mail.fabianm@gmail.com> | 2021-05-09 13:12:21 +0200 |
| commit | f79c0872ddfcbe02a7bcc498b4a9d5d202caccd2 (patch) | |
| tree | 7ff6132f8b7e283a015eccb8ffe6034930f078ed /opendc-web/opendc-web-ui/public | |
| parent | 33e425279f171539205fcda20c6817e9f8e02033 (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/public')
| -rw-r--r-- | opendc-web/opendc-web-ui/public/index.html | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/opendc-web/opendc-web-ui/public/index.html b/opendc-web/opendc-web-ui/public/index.html index da734797..19b80e29 100644 --- a/opendc-web/opendc-web-ui/public/index.html +++ b/opendc-web/opendc-web-ui/public/index.html @@ -33,7 +33,7 @@ <meta property="og:locale" content="en_US"> <!-- Google meta tags --> - <meta name="google-signin-client_id" content="$OAUTH_CLIENT_ID"> + <meta name="google-signin-client_id" content="%REACT_APP_OAUTH_CLIENT_ID%"> <meta name="google-site-verification" content="YIR4LkQTv6WmOdWv8MkeiUKni-0Yu3WHylLp4VvUMig"/> <!-- CDN dependencies --> @@ -53,10 +53,11 @@ gtag('config', 'UA-84285092-3') </script> <script> - window.$$env = { - API_BASE_URL: "$API_BASE_URL", - OAUTH_CLIENT_ID: "$OAUTH_CLIENT_ID", - SENTRY_DSN: "$SENTRY_DSN", + /* Dynamic app variables */ + window.config_overrides = { + REACT_APP_API_BASE_URL: "$REACT_APP_API_BASE_URL", + REACT_APP_OAUTH_CLIENT_ID: "$REACT_APP_OAUTH_CLIENT_ID", + REACT_APP_SENTRY_DSN: "$REACT_APP_SENTRY_DSN", }; </script> </head> |
