From b6582fc89106cb583f0c1ed792f40ab05ea736fc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ivar=20Conradi=20=C3=98sthus?= Date: Wed, 6 Jan 2021 22:07:20 +0100 Subject: [PATCH] fix: move history to folder --- frontend/src/component/history/history-container.js | 2 +- .../src/component/history/history-list-toggle-container.jsx | 2 +- frontend/src/store/{history-actions.js => history/actions.js} | 4 ++-- frontend/src/store/{history-store.js => history/index.js} | 4 ++-- frontend/src/store/index.js | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) rename frontend/src/store/{history-actions.js => history/actions.js} (91%) rename frontend/src/store/{history-store.js => history/index.js} (81%) diff --git a/frontend/src/component/history/history-container.js b/frontend/src/component/history/history-container.js index ee79b6cd61..abec5cb89a 100644 --- a/frontend/src/component/history/history-container.js +++ b/frontend/src/component/history/history-container.js @@ -1,6 +1,6 @@ import { connect } from 'react-redux'; import HistoryComponent from './history-component'; -import { fetchHistory } from './../../store/history-actions'; +import { fetchHistory } from './../..//store/history/actions'; const mapStateToProps = state => { const history = state.history.get('list').toArray(); diff --git a/frontend/src/component/history/history-list-toggle-container.jsx b/frontend/src/component/history/history-list-toggle-container.jsx index d581685a20..b3f940e63a 100644 --- a/frontend/src/component/history/history-list-toggle-container.jsx +++ b/frontend/src/component/history/history-list-toggle-container.jsx @@ -1,6 +1,6 @@ import { connect } from 'react-redux'; import HistoryListToggleComponent from './history-list-toggle-component'; -import { fetchHistoryForToggle } from '../../store/history-actions'; +import { fetchHistoryForToggle } from '../..//store/history/actions'; function getHistoryFromToggle(state, toggleName) { if (!toggleName) { diff --git a/frontend/src/store/history-actions.js b/frontend/src/store/history/actions.js similarity index 91% rename from frontend/src/store/history-actions.js rename to frontend/src/store/history/actions.js index 46699dc258..9207ee5aaa 100644 --- a/frontend/src/store/history-actions.js +++ b/frontend/src/store/history/actions.js @@ -1,5 +1,5 @@ -import api from '../data/history-api'; -import { dispatchAndThrow } from './util'; +import api from '../../data/history-api'; +import { dispatchAndThrow } from '../util'; export const RECEIVE_HISTORY = 'RECEIVE_HISTORY'; export const ERROR_RECEIVE_HISTORY = 'ERROR_RECEIVE_HISTORY'; diff --git a/frontend/src/store/history-store.js b/frontend/src/store/history/index.js similarity index 81% rename from frontend/src/store/history-store.js rename to frontend/src/store/history/index.js index 05b2587a56..b58488cc35 100644 --- a/frontend/src/store/history-store.js +++ b/frontend/src/store/history/index.js @@ -1,6 +1,6 @@ import { List, Map as $Map } from 'immutable'; -import { RECEIVE_HISTORY, RECEIVE_HISTORY_FOR_TOGGLE } from './history-actions'; -import { USER_LOGOUT, USER_LOGIN } from './user/actions'; +import { RECEIVE_HISTORY, RECEIVE_HISTORY_FOR_TOGGLE } from './actions'; +import { USER_LOGOUT, USER_LOGIN } from '../user/actions'; function getInitState() { return new $Map({ list: new List(), toggles: new $Map() }); diff --git a/frontend/src/store/index.js b/frontend/src/store/index.js index 60ed618d90..ed68394410 100644 --- a/frontend/src/store/index.js +++ b/frontend/src/store/index.js @@ -3,7 +3,7 @@ import features from './feature-toggle'; import featureTypes from './feature-type'; import featureMetrics from './feature-metrics-store'; import strategies from './strategy'; -import history from './history-store'; // eslint-disable-line +import history from './history'; // eslint-disable-line import archive from './archive'; import error from './error'; import settings from './settings';