diff options
Diffstat (limited to 'src/components')
-rw-r--r-- | src/components/List.js | 4 | ||||
-rw-r--r-- | src/components/Login.js | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/components/List.js b/src/components/List.js index 76270fa..43a9b3c 100644 --- a/src/components/List.js +++ b/src/components/List.js @@ -43,7 +43,7 @@ class List extends React.Component { queryString() { return [ `limit=${process.env.PER_PAGE}`, - `skip=${(this.state.page - 1) * process.env.PER_PAGE}`, + `skip=${(this.state.page - 1) * window.injectedEnv.PER_PAGE}`, this.filterString() ] .filter(x => x !== null) @@ -52,7 +52,7 @@ class List extends React.Component { // Fetch data from external source, update state getData() { - fetch(`${process.env.COLLECTOR_URL}/sc/v0/get?${this.queryString()}`, { + fetch(window.injectedEnv.COLLECTOR_URL + "/sc/v0/get?" + this.queryString(), { headers: { Authorization: "Bearer " + this.props.token } diff --git a/src/components/Login.js b/src/components/Login.js index bc4baec..d0507af 100644 --- a/src/components/Login.js +++ b/src/components/Login.js @@ -26,7 +26,7 @@ class Login extends React.Component { // NOTE: btoa() limits email, password to ASCII login(email, password) { - fetch(process.env.JWT_URL, { + fetch(window.injectedEnv.JWT_URL, { method: "POST", headers: { Authorization: "Basic " + btoa(email + ":" + password) } }) |