forked from OtterMind/Chat2DB
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.ts
More file actions
21 lines (18 loc) · 787 Bytes
/
Copy pathindex.ts
File metadata and controls
21 lines (18 loc) · 787 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
import { UseBoundStoreWithEqualityFn, createWithEqualityFn } from 'zustand/traditional';
import { devtools } from 'zustand/middleware';
import { shallow } from 'zustand/shallow';
import { StoreApi } from 'zustand';
import { initCopyFocusedContent, ICopyFocusedContent } from './copyFocusedContent';
import { initComponentsContent, IComponentsContent } from './components';
import { initAppTitleBarConfig, IAppTitleBarConfig } from './appTitleBarConfig';
export type IStore = ICopyFocusedContent & IComponentsContent & IAppTitleBarConfig;
export const useCommonStore: UseBoundStoreWithEqualityFn<StoreApi<IStore>> = createWithEqualityFn(
devtools(
() => ({
...initCopyFocusedContent,
...initComponentsContent,
...initAppTitleBarConfig
}),
),
shallow
);