code7-leia 0.2.28 → 0.2.29

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -11,13 +11,12 @@ import { TiDelete } from 'react-icons/ti';
11
11
  import unorm from 'unorm';
12
12
  import { MdClose, MdPerson2 } from 'react-icons/md';
13
13
  import { useDropzone } from 'react-dropzone';
14
- import { getApi as getApi$1 } from 'src/utils/getApi';
14
+ import axios from 'axios';
15
15
  import { PiWaveformBold } from 'react-icons/pi';
16
16
  import { createStore, applyMiddleware } from 'redux';
17
17
  import createSagaMiddleware from 'redux-saga';
18
18
  import { produce } from 'immer';
19
19
  import { all, takeLatest, put, call } from 'redux-saga/effects';
20
- import axios from 'axios';
21
20
  import { toast as toast$1 } from 'react-toastify';
22
21
  import 'react-toastify/dist/ReactToastify.css';
23
22
 
@@ -1219,6 +1218,31 @@ AreaUpload.defaultProps = {
1219
1218
  hasListFiles: true
1220
1219
  };
1221
1220
 
1221
+ var url = 'https://api.leia.digitalcontact.cloud';
1222
+ axios.defaults.baseURL = "" + url;
1223
+ var api = /*#__PURE__*/axios.create();
1224
+
1225
+ var url$1 = 'https://api-hml.leia.digitalcontact.cloud';
1226
+ axios.defaults.baseURL = "" + url$1;
1227
+ var apiHml = /*#__PURE__*/axios.create();
1228
+
1229
+ var url$2 = 'http://localhost:5000';
1230
+ axios.defaults.baseURL = "" + url$2;
1231
+ var apiDev = /*#__PURE__*/axios.create();
1232
+
1233
+ var getApi = function getApi(env) {
1234
+ switch (env.toLowerCase()) {
1235
+ case 'dev':
1236
+ return apiDev;
1237
+ case 'prod':
1238
+ return api;
1239
+ case 'test':
1240
+ return apiHml;
1241
+ default:
1242
+ return api;
1243
+ }
1244
+ };
1245
+
1222
1246
  var _excluded$5 = ["children"];
1223
1247
  var SharedPropsContext = /*#__PURE__*/createContext(undefined);
1224
1248
  var useSharedProps = function useSharedProps() {
@@ -1240,7 +1264,7 @@ var SharedPropsProvider = function SharedPropsProvider(_ref) {
1240
1264
  var _useState2 = useState(null),
1241
1265
  personas = _useState2[0],
1242
1266
  setPersonas = _useState2[1];
1243
- var api = getApi$1(env);
1267
+ var api = getApi(env);
1244
1268
  useEffect(function () {
1245
1269
  var fetchData = /*#__PURE__*/function () {
1246
1270
  var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
@@ -2096,31 +2120,6 @@ function filesReducer(state, action) {
2096
2120
  });
2097
2121
  }
2098
2122
 
2099
- var url = 'https://api.leia.digitalcontact.cloud';
2100
- axios.defaults.baseURL = "" + url;
2101
- var api = /*#__PURE__*/axios.create();
2102
-
2103
- var url$1 = 'https://api-hml.leia.digitalcontact.cloud';
2104
- axios.defaults.baseURL = "" + url$1;
2105
- var apiHml = /*#__PURE__*/axios.create();
2106
-
2107
- var url$2 = 'http://localhost:5000';
2108
- axios.defaults.baseURL = "" + url$2;
2109
- var apiDev = /*#__PURE__*/axios.create();
2110
-
2111
- var getApi = function getApi(env) {
2112
- switch (env.toLowerCase()) {
2113
- case 'dev':
2114
- return apiDev;
2115
- case 'prod':
2116
- return api;
2117
- case 'test':
2118
- return apiHml;
2119
- default:
2120
- return api;
2121
- }
2122
- };
2123
-
2124
2123
  var CustomToastContent = function CustomToastContent(_ref) {
2125
2124
  var title = _ref.title,
2126
2125
  description = _ref.description;