summaryrefslogtreecommitdiff
path: root/opendc-web/opendc-web-ui/src/containers
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/containers
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/containers')
-rw-r--r--opendc-web/opendc-web-ui/src/containers/auth/Login.js5
1 files changed, 3 insertions, 2 deletions
diff --git a/opendc-web/opendc-web-ui/src/containers/auth/Login.js b/opendc-web/opendc-web-ui/src/containers/auth/Login.js
index 9201c09a..bebe015c 100644
--- a/opendc-web/opendc-web-ui/src/containers/auth/Login.js
+++ b/opendc-web/opendc-web-ui/src/containers/auth/Login.js
@@ -3,6 +3,7 @@ import React from 'react'
import GoogleLogin from 'react-google-login'
import { connect } from 'react-redux'
import { logIn } from '../../actions/auth'
+import config from '../../config'
class LoginContainer extends React.Component {
static propTypes = {
@@ -32,12 +33,12 @@ class LoginContainer extends React.Component {
return (
<GoogleLogin
- clientId={window.$$env['OAUTH_CLIENT_ID']}
+ clientId={config['OAUTH_CLIENT_ID']}
onSuccess={this.onAuthResponse.bind(this)}
onFailure={this.onAuthFailure.bind(this)}
render={(renderProps) => (
<span onClick={renderProps.onClick} className="login btn btn-primary">
- <span className="fa fa-google"/> Login with Google
+ <span className="fa fa-google" /> Login with Google
</span>
)}
/>