diff options
author | Vijay A <avijayr@protonmail.com> | 2021-08-21 08:07:32 +0530 |
---|---|---|
committer | Vijay A <avijayr@protonmail.com> | 2021-08-21 08:55:38 +0530 |
commit | b1cf1849f5bfa8f297f78a5ca58d797f466b3086 (patch) | |
tree | 658f3adeb740cf54021dfb6ad951649f0d539e6d /src/stores/index.ts | |
parent | refactor(cleanup): remove code that refers to paid subscription (diff) | |
download | ferdium-app-b1cf1849f5bfa8f297f78a5ca58d797f466b3086.tar.gz ferdium-app-b1cf1849f5bfa8f297f78a5ca58d797f466b3086.tar.zst ferdium-app-b1cf1849f5bfa8f297f78a5ca58d797f466b3086.zip |
chore: typescript conversion
Diffstat (limited to 'src/stores/index.ts')
-rw-r--r-- | src/stores/index.ts | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/src/stores/index.ts b/src/stores/index.ts new file mode 100644 index 000000000..e980f2c5b --- /dev/null +++ b/src/stores/index.ts | |||
@@ -0,0 +1,45 @@ | |||
1 | import AppStore from './AppStore'; | ||
2 | import UserStore from './UserStore'; | ||
3 | import FeaturesStore from './FeaturesStore'; | ||
4 | import SettingsStore from './SettingsStore'; | ||
5 | import ServicesStore from './ServicesStore'; | ||
6 | import RecipesStore from './RecipesStore'; | ||
7 | import RecipePreviewsStore from './RecipePreviewsStore'; | ||
8 | import UIStore from './UIStore'; | ||
9 | import NewsStore from './NewsStore'; | ||
10 | import RequestStore from './RequestStore'; | ||
11 | import GlobalErrorStore from './GlobalErrorStore'; | ||
12 | import { workspaceStore } from '../features/workspaces'; | ||
13 | import { announcementsStore } from '../features/announcements'; | ||
14 | import { communityRecipesStore } from '../features/communityRecipes'; | ||
15 | import { todosStore } from '../features/todos'; | ||
16 | |||
17 | export default (api, actions, router) => { | ||
18 | const stores = {}; | ||
19 | Object.assign(stores, { | ||
20 | router, | ||
21 | app: new AppStore(stores, api, actions), | ||
22 | user: new UserStore(stores, api, actions), | ||
23 | features: new FeaturesStore(stores, api, actions), | ||
24 | settings: new SettingsStore(stores, api, actions), | ||
25 | services: new ServicesStore(stores, api, actions), | ||
26 | recipes: new RecipesStore(stores, api, actions), | ||
27 | recipePreviews: new RecipePreviewsStore(stores, api, actions), | ||
28 | ui: new UIStore(stores, api, actions), | ||
29 | news: new NewsStore(stores, api, actions), | ||
30 | requests: new RequestStore(stores, api, actions), | ||
31 | globalError: new GlobalErrorStore(stores, api, actions), | ||
32 | workspaces: workspaceStore, | ||
33 | announcements: announcementsStore, | ||
34 | communityRecipes: communityRecipesStore, | ||
35 | todos: todosStore, | ||
36 | }); | ||
37 | |||
38 | // Initialize all stores | ||
39 | Object.keys(stores).forEach((name) => { | ||
40 | if (stores[name] && stores[name].initialize) { | ||
41 | stores[name].initialize(); | ||
42 | } | ||
43 | }); | ||
44 | return stores; | ||
45 | }; | ||