aboutsummaryrefslogtreecommitdiffstats
path: root/src/stores/index.js
diff options
context:
space:
mode:
authorLibravatar Stefan Malzner <stefan@adlk.io>2017-10-13 12:29:40 +0200
committerLibravatar Stefan Malzner <stefan@adlk.io>2017-10-13 12:29:40 +0200
commit58cda9cc7fb79ca9df6746de7f9662bc08dc156a (patch)
tree1211600c2a5d3b5f81c435c6896618111a611720 /src/stores/index.js
downloadferdium-app-58cda9cc7fb79ca9df6746de7f9662bc08dc156a.tar.gz
ferdium-app-58cda9cc7fb79ca9df6746de7f9662bc08dc156a.tar.zst
ferdium-app-58cda9cc7fb79ca9df6746de7f9662bc08dc156a.zip
initial commit
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};