aboutsummaryrefslogtreecommitdiffstats
path: root/src/stores/index.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/stores/index.js')
-rw-r--r--src/stores/index.js34
1 files changed, 34 insertions, 0 deletions
diff --git a/src/stores/index.js b/src/stores/index.js
new file mode 100644
index 000000000..2d99e3952
--- /dev/null
+++ b/src/stores/index.js
@@ -0,0 +1,34 @@
1import AppStore from './AppStore';
2import UserStore from './UserStore';
3import SettingsStore from './SettingsStore';
4import ServicesStore from './ServicesStore';
5import RecipesStore from './RecipesStore';
6import RecipePreviewsStore from './RecipePreviewsStore';
7import UIStore from './UIStore';
8import PaymentStore from './PaymentStore';
9import NewsStore from './NewsStore';
10import RequestStore from './RequestStore';
11import GlobalErrorStore from './GlobalErrorStore';
12
13export default (api, actions, router) => {
14 const stores = {};
15 Object.assign(stores, {
16 router,
17 app: new AppStore(stores, api, actions),
18 user: new UserStore(stores, api, actions),
19 settings: new SettingsStore(stores, api, actions),
20 services: new ServicesStore(stores, api, actions),
21 recipes: new RecipesStore(stores, api, actions),
22 recipePreviews: new RecipePreviewsStore(stores, api, actions),
23 ui: new UIStore(stores, api, actions),
24 payment: new PaymentStore(stores, api, actions),
25 news: new NewsStore(stores, api, actions),
26 requests: new RequestStore(stores, api, actions),
27 globalError: new GlobalErrorStore(stores, api, actions),
28 });
29 // Initialize all stores
30 Object.keys(stores).forEach((name) => {
31 if (stores[name] && stores[name].initialize) stores[name].initialize();
32 });
33 return stores;
34};