mirror of
https://github.com/muerwre/vault-frontend.git
synced 2025-04-24 20:36:40 +07:00
27 lines
707 B
TypeScript
27 lines
707 B
TypeScript
import { makeAutoObservable } from 'mobx';
|
|
import { FlowStore } from '~/store/flow/FlowStore';
|
|
import { ModalStore } from '~/store/modal/ModalStore';
|
|
import { LabStore } from '~/store/lab/LabStore';
|
|
import { AuthStore } from '~/store/auth/AuthStore';
|
|
import { enableStaticRendering, useStaticRendering } from 'mobx-react-lite';
|
|
|
|
export class Store {
|
|
flow = new FlowStore();
|
|
modal = new ModalStore();
|
|
lab = new LabStore();
|
|
auth = new AuthStore();
|
|
|
|
constructor() {
|
|
makeAutoObservable(this);
|
|
}
|
|
|
|
get isHydrated() {
|
|
return this.auth.isHydrated;
|
|
}
|
|
}
|
|
|
|
const defaultStore = new Store();
|
|
|
|
export const getMOBXStore = () => defaultStore;
|
|
|
|
enableStaticRendering(typeof window === 'undefined');
|