From 21171f4ff8a39f8259387021a9f4fee4b956d304 Mon Sep 17 00:00:00 2001 From: RujitRaval Date: Wed, 16 Oct 2019 12:13:49 -0400 Subject: [PATCH 1/2] Homepage change to new user --- src/App.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/App.js b/src/App.js index 1a787a0c4..ff411b735 100644 --- a/src/App.js +++ b/src/App.js @@ -27,7 +27,7 @@ class App extends React.Component { super(props); this.state = { isReturningUser: false, - isNewUser: false, + isNewUser: true, submitted: false, disabled: true, selectedBuildingId: -1, -- GitLab From 5315924e137bd57be15ed73f46c4386a05b957c7 Mon Sep 17 00:00:00 2001 From: Jinal Soni Date: Wed, 16 Oct 2019 15:57:13 -0400 Subject: [PATCH 2/2] env and urlLink changed --- .env | 6 ++++++ src/actions.js | 12 +++++++----- 2 files changed, 13 insertions(+), 5 deletions(-) create mode 100644 .env diff --git a/.env b/.env new file mode 100644 index 000000000..667ad2b32 --- /dev/null +++ b/.env @@ -0,0 +1,6 @@ +mapboxApiAccessToken= 'pk.eyJ1IjoiYmxvY3Bvd2VyIiwiYSI6ImNqd202bngzazE3c2o0OW4wM2IzbG00Y2cifQ.ZdSoYvbdw4fuIul8PQ3sBQ' +# Environment +ENVIRONMENT=local + +# Services +REACT_APP_BLOCLINK_URL=http://0.0.0.0:5410 diff --git a/src/actions.js b/src/actions.js index b37ede44a..506aea73b 100644 --- a/src/actions.js +++ b/src/actions.js @@ -3,10 +3,11 @@ import axios from 'axios'; // asynchronous action creator export const verifyUser = (user) => { const blocLinkUrl = process.env.REACT_APP_BLOCLINK_URL; + console.log(blocLinkUrl) return (dispatch) => { dispatch({ type: "UserRequested" }); return axios.put( - `${blocLinkUrl}buildings/bis/verify-user/`, + `${blocLinkUrl}/buildings/bis/verify-user/`, user, { headers : { 'Content-Type' : 'application/x-www-form-urlencoded; charset=UTF-8' } }, ) @@ -23,7 +24,7 @@ export const verifyToken = (user) => { return (dispatch) => { dispatch({ type: "TokenRequested" }); return axios.put( - `${blocLinkUrl}buildings/bis/verify-token/`, + `${blocLinkUrl}/buildings/bis/verify-token/`, user, { headers : { 'Content-Type' : 'application/x-www-form-urlencoded; charset=UTF-8' } }, ) @@ -37,10 +38,11 @@ export const verifyToken = (user) => { // asynchronous action creator export const submitBuilding = (data) => { const blocLinkUrl = process.env.REACT_APP_BLOCLINK_URL; + console.log(blocLinkUrl) return (dispatch) => { dispatch({ type: "BuildingRequested" }); return axios.put( - `${blocLinkUrl}buildings/bis/submit-building/`, + `${blocLinkUrl}/buildings/bis/submit-building/`, data, { headers : { 'Content-Type' : 'application/x-www-form-urlencoded; charset=UTF-8' } }, ) @@ -57,7 +59,7 @@ export const submitAnswer = (data) => { return (dispatch) => { dispatch({ type: "AnswerRequested" }); return axios.put( - `${blocLinkUrl}buildings/bis/submit-answer/`, + `${blocLinkUrl}/buildings/bis/submit-answer/`, data, { headers : { 'Content-Type' : 'application/x-www-form-urlencoded; charset=UTF-8' } }, ) @@ -73,7 +75,7 @@ export const completeQuestionnaire = (user) => { return (dispatch) => { dispatch({ type: "CompleteRequested" }); return axios.put( - `${blocLinkUrl}buildings/bis/complete/`, + `${blocLinkUrl}/buildings/bis/complete/`, user, { headers : { 'Content-Type' : 'application/x-www-form-urlencoded; charset=UTF-8' } }, ) -- GitLab