Просмотр исходного кода

chore(js): Avoid default export Reflux (#33099)

Evan Purkhiser 2 лет назад
Родитель
Сommit
5958c3f176

+ 2 - 2
static/app/actions/alertActions.tsx

@@ -1,5 +1,5 @@
-import Reflux from 'reflux';
+import {createActions} from 'reflux';
 
-const AlertActions = Reflux.createActions(['addAlert', 'closeAlert']);
+const AlertActions = createActions(['addAlert', 'closeAlert']);
 
 export default AlertActions;

+ 2 - 7
static/app/actions/committerActions.tsx

@@ -1,10 +1,5 @@
-import Reflux from 'reflux';
+import {createActions} from 'reflux';
 
-const ComitterActions = Reflux.createActions([
-  'reset',
-  'load',
-  'loadError',
-  'loadSuccess',
-]);
+const ComitterActions = createActions(['reset', 'load', 'loadError', 'loadSuccess']);
 
 export default ComitterActions;

+ 2 - 2
static/app/actions/environmentActions.tsx

@@ -1,6 +1,6 @@
-import Reflux from 'reflux';
+import {createActions} from 'reflux';
 
-const EnvironmentActions = Reflux.createActions([
+const EnvironmentActions = createActions([
   'fetchEnvironments',
   'fetchEnvironmentsError',
   'fetchEnvironmentsSuccess',

+ 2 - 2
static/app/actions/formSearchActions.tsx

@@ -1,5 +1,5 @@
-import Reflux from 'reflux';
+import {createActions} from 'reflux';
 
-const FormSearchActions = Reflux.createActions(['loadSearchMap']);
+const FormSearchActions = createActions(['loadSearchMap']);
 
 export default FormSearchActions;

+ 2 - 2
static/app/actions/groupActions.tsx

@@ -1,8 +1,8 @@
-import Reflux from 'reflux';
+import {createActions} from 'reflux';
 
 // TODO(dcramer): we should probably just make every parameter update
 // work on bulk groups
-const GroupActions = Reflux.createActions([
+const GroupActions = createActions([
   'assignTo',
   'assignToError',
   'assignToSuccess',

+ 2 - 2
static/app/actions/groupingActions.tsx

@@ -1,7 +1,7 @@
-import Reflux from 'reflux';
+import {createActions} from 'reflux';
 
 // Actions for "Grouping" view - for merging/unmerging events/issues
-const GroupingActions = Reflux.createActions([
+const GroupingActions = createActions([
   'fetch',
   'showAllSimilarItems',
   'toggleUnmerge',

+ 2 - 2
static/app/actions/guideActions.tsx

@@ -1,6 +1,6 @@
-import Reflux from 'reflux';
+import {createActions} from 'reflux';
 
-const GuideActions = Reflux.createActions([
+const GuideActions = createActions([
   'closeGuide',
   'fetchSucceeded',
   'nextStep',

+ 2 - 8
static/app/actions/indicatorActions.tsx

@@ -1,11 +1,5 @@
-import Reflux from 'reflux';
+import {createActions} from 'reflux';
 
-const IndicatorActions = Reflux.createActions([
-  'replace',
-  'append',
-  'remove',
-  'clear',
-  'undo',
-]);
+const IndicatorActions = createActions(['replace', 'append', 'remove', 'clear', 'undo']);
 
 export default IndicatorActions;

+ 2 - 2
static/app/actions/memberActions.tsx

@@ -1,6 +1,6 @@
-import Reflux from 'reflux';
+import {createActions} from 'reflux';
 
-const MemberActions = Reflux.createActions([
+const MemberActions = createActions([
   'createSuccess',
   'update',
   'updateError',

+ 2 - 2
static/app/actions/metricTagActions.tsx

@@ -1,5 +1,5 @@
-import Reflux from 'reflux';
+import {createActions} from 'reflux';
 
-const MetricsTagActions = Reflux.createActions(['loadMetricsTagsSuccess']);
+const MetricsTagActions = createActions(['loadMetricsTagsSuccess']);
 
 export default MetricsTagActions;

Некоторые файлы не были показаны из-за большого количества измененных файлов