From f42dce509cc588aa7bfa8c303abb5a1414267e3c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ivar=20Conradi=20=C3=98sthus?= Date: Wed, 6 Jan 2021 21:59:47 +0100 Subject: [PATCH] fix: move error store into folder --- frontend/src/component/error/error-container.jsx | 2 +- frontend/src/store/application/actions.js | 2 +- .../store/{error-actions.js => error/actions.js} | 0 .../src/store/{error-store.js => error/index.js} | 14 +++++++------- frontend/src/store/feature-actions.js | 2 +- frontend/src/store/index.js | 2 +- 6 files changed, 11 insertions(+), 11 deletions(-) rename frontend/src/store/{error-actions.js => error/actions.js} (100%) rename frontend/src/store/{error-store.js => error/index.js} (87%) diff --git a/frontend/src/component/error/error-container.jsx b/frontend/src/component/error/error-container.jsx index 8c536364f5..8cda379397 100644 --- a/frontend/src/component/error/error-container.jsx +++ b/frontend/src/component/error/error-container.jsx @@ -1,6 +1,6 @@ import { connect } from 'react-redux'; import ErrorComponent from './error-component'; -import { muteError } from '../../store/error-actions'; +import { muteError } from '../../store/error/actions'; const mapDispatchToProps = { muteError, diff --git a/frontend/src/store/application/actions.js b/frontend/src/store/application/actions.js index 0c6ceec372..f8d1afff9a 100644 --- a/frontend/src/store/application/actions.js +++ b/frontend/src/store/application/actions.js @@ -1,6 +1,6 @@ import api from '../../data/applications-api'; import { dispatchAndThrow } from '../util'; -import { MUTE_ERROR } from '../error-actions'; +import { MUTE_ERROR } from '../error/actions'; export const RECEIVE_ALL_APPLICATIONS = 'RECEIVE_ALL_APPLICATIONS'; export const ERROR_RECEIVE_ALL_APPLICATIONS = 'ERROR_RECEIVE_ALL_APPLICATIONS'; diff --git a/frontend/src/store/error-actions.js b/frontend/src/store/error/actions.js similarity index 100% rename from frontend/src/store/error-actions.js rename to frontend/src/store/error/actions.js diff --git a/frontend/src/store/error-store.js b/frontend/src/store/error/index.js similarity index 87% rename from frontend/src/store/error-store.js rename to frontend/src/store/error/index.js index 9f5dfdfd9e..731b18d36a 100644 --- a/frontend/src/store/error-store.js +++ b/frontend/src/store/error/index.js @@ -1,5 +1,5 @@ import { List, Map as $Map } from 'immutable'; -import { MUTE_ERROR } from './error-actions'; +import { MUTE_ERROR } from './actions'; import { ERROR_FETCH_FEATURE_TOGGLES, ERROR_CREATING_FEATURE_TOGGLE, @@ -7,17 +7,17 @@ import { ERROR_UPDATE_FEATURE_TOGGLE, UPDATE_FEATURE_TOGGLE_STRATEGIES, UPDATE_FEATURE_TOGGLE, -} from './feature-actions'; +} from '../feature-actions'; -import { ERROR_UPDATING_STRATEGY, ERROR_CREATING_STRATEGY, ERROR_RECEIVE_STRATEGIES } from './strategy/actions'; +import { ERROR_UPDATING_STRATEGY, ERROR_CREATING_STRATEGY, ERROR_RECEIVE_STRATEGIES } from '../strategy/actions'; -import { ERROR_ADD_CONTEXT_FIELD, ERROR_UPDATE_CONTEXT_FIELD } from './context/actions'; +import { ERROR_ADD_CONTEXT_FIELD, ERROR_UPDATE_CONTEXT_FIELD } from '../context/actions'; -import { ERROR_REMOVING_PROJECT, ERROR_ADD_PROJECT, ERROR_UPDATE_PROJECT } from './project/actions'; +import { ERROR_REMOVING_PROJECT, ERROR_ADD_PROJECT, ERROR_UPDATE_PROJECT } from '../project/actions'; -import { UPDATE_APPLICATION_FIELD } from './application/actions'; +import { UPDATE_APPLICATION_FIELD } from '../application/actions'; -import { FORBIDDEN } from './util'; +import { FORBIDDEN } from '../util'; const debug = require('debug')('unleash:error-store'); diff --git a/frontend/src/store/feature-actions.js b/frontend/src/store/feature-actions.js index 73ec90e3c3..9ac0745fc6 100644 --- a/frontend/src/store/feature-actions.js +++ b/frontend/src/store/feature-actions.js @@ -1,7 +1,7 @@ import api from '../data/feature-api'; const debug = require('debug')('unleash:feature-actions'); import { dispatchAndThrow } from './util'; -import { MUTE_ERROR } from './error-actions'; +import { MUTE_ERROR } from './error/actions'; export const ADD_FEATURE_TOGGLE = 'ADD_FEATURE_TOGGLE'; export const COPY_FEATURE_TOGGLE = 'COPY_FEATURE_TOGGLE'; diff --git a/frontend/src/store/index.js b/frontend/src/store/index.js index d93d5629ae..c0d5f2985d 100644 --- a/frontend/src/store/index.js +++ b/frontend/src/store/index.js @@ -5,7 +5,7 @@ import featureMetrics from './feature-metrics-store'; import strategies from './strategy'; import history from './history-store'; // eslint-disable-line import archive from './archive'; -import error from './error-store'; +import error from './error'; import settings from './settings'; import user from './user'; import applications from './application';