From 0395ebd66872f13b1e38fae299c5ba3663c872fd Mon Sep 17 00:00:00 2001 From: guhur <12297742+guhur@users.noreply.github.com> Date: Thu, 7 May 2020 15:36:47 +0200 Subject: [PATCH] fix(feedback-form): move link to process env (#47) * fix(feedback-form): move link to process env * fix(feedback-form): update .env with new env var * fix(feedback-form): update .env with new env var * fix(feedback-form): factor code into AppContext I also switch on the option in eslintrc for node and commonjs Otherwise, process is declared as undefined --- .eslintrc.json | 4 +++- src/AppContext.jsx | 2 +- src/components/banner/Gform.jsx | 4 +--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.eslintrc.json b/.eslintrc.json index 5f65023..d94c7f7 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -1,7 +1,9 @@ { "env": { "browser": true, - "es6": true + "es6": true, + "node": true, + "commonjs": true }, "parser": "babel-eslint", "extends": [ diff --git a/src/AppContext.jsx b/src/AppContext.jsx index 45c8bc1..9ecc10d 100644 --- a/src/AppContext.jsx +++ b/src/AppContext.jsx @@ -7,8 +7,8 @@ export const AppContext = createContext(); const AppContextProvider = ({ children }) => { const defaultState = { - // eslint-disable-next-line no-undef urlServer: process.env.REACT_APP_SERVER_URL, + feedbackForm: process.env.REACT_APP_FEEDBACK_FORM, routesServer: { setElection: "election/", getElection: "election/get/:slug/", diff --git a/src/components/banner/Gform.jsx b/src/components/banner/Gform.jsx index 5cfe10e..44f5017 100644 --- a/src/components/banner/Gform.jsx +++ b/src/components/banner/Gform.jsx @@ -7,7 +7,7 @@ const Gform = props => { return ( @@ -18,5 +18,3 @@ const Gform = props => { }; export default Gform; - -//https://docs.google.com/forms/d/1Y5ocQscSkHFZdniR7Lvc9mbkJYe9ZIC4w0tOvC4rDZo/viewform?edit_requested=true