aboutsummaryrefslogtreecommitdiffstats
path: root/src/stores/index.ts
diff options
context:
space:
mode:
authorLibravatar Ricardo Cino <ricardo@cino.io>2022-06-26 23:59:32 +0200
committerLibravatar GitHub <noreply@github.com>2022-06-26 21:59:32 +0000
commit6bff2bb5439d25e0ab2a24a8ca1b28b89ef40ff9 (patch)
tree1676f5eef42b8086d28476c7eaad62c7b1753120 /src/stores/index.ts
parentReduce tab item layout shift (#376) (diff)
downloadferdium-app-6bff2bb5439d25e0ab2a24a8ca1b28b89ef40ff9.tar.gz
ferdium-app-6bff2bb5439d25e0ab2a24a8ca1b28b89ef40ff9.tar.zst
ferdium-app-6bff2bb5439d25e0ab2a24a8ca1b28b89ef40ff9.zip
chore: turned all auth containers into typescript (#375)
Diffstat (limited to 'src/stores/index.ts')
-rw-r--r--src/stores/index.ts22
1 files changed, 19 insertions, 3 deletions
diff --git a/src/stores/index.ts b/src/stores/index.ts
index a5b1a7452..aac501cda 100644
--- a/src/stores/index.ts
+++ b/src/stores/index.ts
@@ -1,4 +1,3 @@
1import { Stores } from 'src/stores.types';
2import { RouterStore } from 'mobx-react-router'; 1import { RouterStore } from 'mobx-react-router';
3import { ApiInterface } from 'src/api'; 2import { ApiInterface } from 'src/api';
4import { Actions } from 'src/actions/lib/actions'; 3import { Actions } from 'src/actions/lib/actions';
@@ -16,12 +15,29 @@ import { workspaceStore } from '../features/workspaces';
16import { communityRecipesStore } from '../features/communityRecipes'; 15import { communityRecipesStore } from '../features/communityRecipes';
17import { todosStore } from '../features/todos'; 16import { todosStore } from '../features/todos';
18 17
18export interface RealStores {
19 router: RouterStore;
20 app: AppStore;
21 user: UserStore;
22 features: FeaturesStore;
23 settings: SettingsStore;
24 services: ServicesStore;
25 recipes: RecipesStore;
26 recipePreviews: RecipePreviewsStore;
27 ui: UIStore;
28 requests: RequestStore;
29 globalError: GlobalErrorStore;
30 workspaces: typeof workspaceStore;
31 communityRecipes: typeof communityRecipesStore;
32 todos: typeof todosStore;
33}
34
19export default ( 35export default (
20 api: ApiInterface, 36 api: ApiInterface,
21 actions: Actions, 37 actions: Actions,
22 router: RouterStore, 38 router: RouterStore,
23): Stores => { 39): RealStores => {
24 const stores: Stores | any = {}; 40 const stores: RealStores | any = {};
25 Object.assign(stores, { 41 Object.assign(stores, {
26 router, 42 router,
27 app: new AppStore(stores, api, actions), 43 app: new AppStore(stores, api, actions),