From 8bad650d23b194581949fe9f9f2ba050b78bdb9e Mon Sep 17 00:00:00 2001 From: GotPPay Date: Mon, 30 Jul 2018 16:20:51 +0200 Subject: [PATCH] remove obsolete config variables --- frontend.dockerfile | 6 +----- frontend/src/config.js | 20 +++----------------- 2 files changed, 4 insertions(+), 22 deletions(-) diff --git a/frontend.dockerfile b/frontend.dockerfile index c179fb2..4834fd4 100644 --- a/frontend.dockerfile +++ b/frontend.dockerfile @@ -1,10 +1,6 @@ FROM php:7.0-apache ARG API_URL -ENV REACT_APP_API_URL=${API_URL} - -ENV REACT_APP_TEST_URL ${API_URL} -ENV REACT_APP_PROD_URL ${APIP_URL} -ENV REACT_APP_DEV_URL ${API_URL} +ENV REACT_APP_API_URL ${API_URL} RUN apt-get update && apt-get install -y git unzip gnupg RUN curl -sL https://deb.nodesource.com/setup_8.x | bash - diff --git a/frontend/src/config.js b/frontend/src/config.js index 3ed8a32..3bca27e 100644 --- a/frontend/src/config.js +++ b/frontend/src/config.js @@ -1,21 +1,7 @@ -import processReducer from "./reducers/orders/processReducers"; - -const APPLICAITON_MODE = 'DEV'; const APPLICATION_NAME = 'Co-Market'; const API_VERSION = 'v2'; -const API_SERVER_BASE = (() => { - if(APPLICAITON_MODE === 'TEST'){ - return process.env.REACT_APP_TEST_URL; - } +const API_SERVER_BASE = process.env.REACT_APP_API_URL; +const API_SERVER = API_SERVER_BASE; - if(APPLICAITON_MODE === 'PROD'){ - return process.env.REACT_APP_PROD_URL; - } - - return process.env.REACT_APP_DEV_URL; -})(); - -const API_SERVER = API_SERVER_BASE - -export {APPLICAITON_MODE, API_SERVER_BASE, API_SERVER, APPLICATION_NAME} +export {API_SERVER_BASE, API_SERVER, APPLICATION_NAME}