From fffb99a47aeb0f6676f5cb06525a6b472da29e8c Mon Sep 17 00:00:00 2001 From: jero Date: Wed, 28 Aug 2019 23:58:12 -0500 Subject: [PATCH] refactor(store): create config folder improve #28 --- src/app/store/{ => config}/configureStore.js | 4 ++-- .../{ => config}/middlewares/apiMiddleware/apiMiddleware.js | 0 .../middlewares/apiMiddleware/apiMiddleware.test.js | 0 src/app/store/{ => config}/middlewares/apiMiddleware/index.js | 0 src/app/store/{ => config}/middlewares/index.js | 0 src/app/store/{ => config}/middlewares/logger/index.js | 0 src/app/store/{ => config}/middlewares/logger/logger.js | 0 src/app/store/{ => config}/middlewares/logger/logger.test.js | 0 src/app/store/{localStorage.js => config/storage.js} | 0 src/app/store/index.js | 2 +- 10 files changed, 3 insertions(+), 3 deletions(-) rename src/app/store/{ => config}/configureStore.js (93%) rename src/app/store/{ => config}/middlewares/apiMiddleware/apiMiddleware.js (100%) rename src/app/store/{ => config}/middlewares/apiMiddleware/apiMiddleware.test.js (100%) rename src/app/store/{ => config}/middlewares/apiMiddleware/index.js (100%) rename src/app/store/{ => config}/middlewares/index.js (100%) rename src/app/store/{ => config}/middlewares/logger/index.js (100%) rename src/app/store/{ => config}/middlewares/logger/logger.js (100%) rename src/app/store/{ => config}/middlewares/logger/logger.test.js (100%) rename src/app/store/{localStorage.js => config/storage.js} (100%) diff --git a/src/app/store/configureStore.js b/src/app/store/config/configureStore.js similarity index 93% rename from src/app/store/configureStore.js rename to src/app/store/config/configureStore.js index d9a19614..e20110f1 100644 --- a/src/app/store/configureStore.js +++ b/src/app/store/config/configureStore.js @@ -8,12 +8,12 @@ import type { Actions } from '@/store/types/Actions'; // import throttle from 'lodash.throttle'; // Middleware is the suggested way to extend Redux with custom functionality. -import middlewares from '@/store/middlewares'; +import middlewares from '@/store/config/middlewares'; // import all reducers import reducer from '@/store/reducers'; -// import { saveState, loadState } from './localStorage'; +// import { saveState, loadState } from './storage'; // Get the state from localStorage // const persistedState = loadState(); diff --git a/src/app/store/middlewares/apiMiddleware/apiMiddleware.js b/src/app/store/config/middlewares/apiMiddleware/apiMiddleware.js similarity index 100% rename from src/app/store/middlewares/apiMiddleware/apiMiddleware.js rename to src/app/store/config/middlewares/apiMiddleware/apiMiddleware.js diff --git a/src/app/store/middlewares/apiMiddleware/apiMiddleware.test.js b/src/app/store/config/middlewares/apiMiddleware/apiMiddleware.test.js similarity index 100% rename from src/app/store/middlewares/apiMiddleware/apiMiddleware.test.js rename to src/app/store/config/middlewares/apiMiddleware/apiMiddleware.test.js diff --git a/src/app/store/middlewares/apiMiddleware/index.js b/src/app/store/config/middlewares/apiMiddleware/index.js similarity index 100% rename from src/app/store/middlewares/apiMiddleware/index.js rename to src/app/store/config/middlewares/apiMiddleware/index.js diff --git a/src/app/store/middlewares/index.js b/src/app/store/config/middlewares/index.js similarity index 100% rename from src/app/store/middlewares/index.js rename to src/app/store/config/middlewares/index.js diff --git a/src/app/store/middlewares/logger/index.js b/src/app/store/config/middlewares/logger/index.js similarity index 100% rename from src/app/store/middlewares/logger/index.js rename to src/app/store/config/middlewares/logger/index.js diff --git a/src/app/store/middlewares/logger/logger.js b/src/app/store/config/middlewares/logger/logger.js similarity index 100% rename from src/app/store/middlewares/logger/logger.js rename to src/app/store/config/middlewares/logger/logger.js diff --git a/src/app/store/middlewares/logger/logger.test.js b/src/app/store/config/middlewares/logger/logger.test.js similarity index 100% rename from src/app/store/middlewares/logger/logger.test.js rename to src/app/store/config/middlewares/logger/logger.test.js diff --git a/src/app/store/localStorage.js b/src/app/store/config/storage.js similarity index 100% rename from src/app/store/localStorage.js rename to src/app/store/config/storage.js diff --git a/src/app/store/index.js b/src/app/store/index.js index 4964b0c1..934f17c1 100644 --- a/src/app/store/index.js +++ b/src/app/store/index.js @@ -1,6 +1,6 @@ // @flow strict -import configureStore from './configureStore'; +import configureStore from './config/configureStore'; const store = configureStore();