touchstudy-core 0.1.4 → 0.1.5

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.
package/dist/index.js CHANGED
@@ -24,11 +24,15 @@ var setUser = toolkit.createAction("common/setUser");
24
24
  var setLanguage = toolkit.createAction("common/setLanguage");
25
25
  var reset = toolkit.createAction("common/reset");
26
26
 
27
+ var isLocalHost = Boolean(window.location.hostname === "localhost" || window.location.hostname === "[::1]" || window.location.hostname.match(/^127(?:\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/));
28
+
27
29
  var GOOGLE_CLIENT_ID = "64118819726-0qlur4qjrs9jbuu6rnoa0u91g680lmpg.apps.googleusercontent.com";
28
30
  var GOOGLE_RECAPTCHA_ID = "6LfNtLUaAAAAAL24lbBV11jS-gBtt1mhtxb4NXs0";
29
31
  var ACCESS_TOKEN = "ACCESS_TOKEN";
30
32
  var DATE_MIN_VALUE = "0001-01-01T00:00:00+00:00";
31
- var BASE_URL = "http://api.touchstudy.kr";
33
+ var BASE_URL = function () {
34
+ return isLocalHost ? "https://localhost:7045" : "api.studypeak.io";
35
+ }();
32
36
  var PUSHER_CONFIG = {
33
37
  cluster: "ap1",
34
38
  key: "9018c77328885a14150b"
@@ -1381,16 +1385,16 @@ var canAccess = function canAccess(userRoles, componentRoles) {
1381
1385
  var historyCore = history.createBrowserHistory();
1382
1386
 
1383
1387
  Object.defineProperty(exports, 'I18nextProvider', {
1384
- enumerable: true,
1385
- get: function () {
1386
- return reactI18next.I18nextProvider;
1387
- }
1388
+ enumerable: true,
1389
+ get: function () {
1390
+ return reactI18next.I18nextProvider;
1391
+ }
1388
1392
  });
1389
1393
  Object.defineProperty(exports, 'useTranslation', {
1390
- enumerable: true,
1391
- get: function () {
1392
- return reactI18next.useTranslation;
1393
- }
1394
+ enumerable: true,
1395
+ get: function () {
1396
+ return reactI18next.useTranslation;
1397
+ }
1394
1398
  });
1395
1399
  exports.ACCESS_TOKEN = ACCESS_TOKEN;
1396
1400
  exports.BASE_URL = BASE_URL;