diff options
Diffstat (limited to 'opendc-web/opendc-web-ui/src')
| -rw-r--r-- | opendc-web/opendc-web-ui/src/api/routes/token-signin.js | 2 | ||||
| -rw-r--r-- | opendc-web/opendc-web-ui/src/api/socket.js | 2 | ||||
| -rw-r--r-- | opendc-web/opendc-web-ui/src/containers/auth/Login.js | 6 | ||||
| -rw-r--r-- | opendc-web/opendc-web-ui/src/index.js | 5 |
4 files changed, 8 insertions, 7 deletions
diff --git a/opendc-web/opendc-web-ui/src/api/routes/token-signin.js b/opendc-web/opendc-web-ui/src/api/routes/token-signin.js index d6cff570..e40127f2 100644 --- a/opendc-web/opendc-web-ui/src/api/routes/token-signin.js +++ b/opendc-web/opendc-web-ui/src/api/routes/token-signin.js @@ -1,5 +1,5 @@ export function performTokenSignIn(token) { - const apiUrl = process.env.REACT_APP_API_BASE_URL || '' + const apiUrl = window.$$env['API_BASE_URL'] || '' return fetch(`${apiUrl}/tokensignin`, { method: 'POST', diff --git a/opendc-web/opendc-web-ui/src/api/socket.js b/opendc-web/opendc-web-ui/src/api/socket.js index 1c432167..884c4152 100644 --- a/opendc-web/opendc-web-ui/src/api/socket.js +++ b/opendc-web/opendc-web-ui/src/api/socket.js @@ -7,7 +7,7 @@ const callbacks = {} export function setupSocketConnection(onConnect) { const apiUrl = - process.env.REACT_APP_API_BASE_URL || + window.$$env['API_BASE_URL'] || `${window.location.protocol}//${window.location.hostname}:${window.location.port}` socket = io.connect(apiUrl) 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 2f9726bf..9201c09a 100644 --- a/opendc-web/opendc-web-ui/src/containers/auth/Login.js +++ b/opendc-web/opendc-web-ui/src/containers/auth/Login.js @@ -32,15 +32,15 @@ class LoginContainer extends React.Component { return ( <GoogleLogin - clientId={process.env.REACT_APP_OAUTH_CLIENT_ID} + clientId={window.$$env['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> )} - ></GoogleLogin> + /> ) } } diff --git a/opendc-web/opendc-web-ui/src/index.js b/opendc-web/opendc-web-ui/src/index.js index 3517147e..bddf0b0e 100644 --- a/opendc-web/opendc-web-ui/src/index.js +++ b/opendc-web/opendc-web-ui/src/index.js @@ -12,10 +12,11 @@ setupSocketConnection(() => { const store = configureStore() // Initialize Sentry if the user has configured a DSN - if (process.env.REACT_APP_SENTRY_DSN) { + const dsn = window.$$env['SENTRY_DSN'] + if (dsn) { Sentry.init({ environment: process.env.NODE_ENV, - dsn: process.env.REACT_APP_SENTRY_DSN, + dsn: dsn, integrations: [new Integrations.BrowserTracing()], tracesSampleRate: 0.1, }) |
