- initial;

This commit is contained in:
Vitalii Kiiko
2024-08-09 08:51:20 +02:00
commit 987b1b0110
46 changed files with 30261 additions and 0 deletions

20
src/store/index.js Normal file
View File

@@ -0,0 +1,20 @@
import { mapValuesKey } from 'zustand-x';
// stores
import { mainStore } from './main';
// Global store - initial data
const dashboardStore = {
main: mainStore
};
// Global hook selectors
export const useStore = () => mapValuesKey('use', dashboardStore);
// Global tracked hook selectors
export const useTrackedStore = () => mapValuesKey('useTracked', dashboardStore);
// Global getter selectors
export const storeGet = mapValuesKey('get', dashboardStore);
// Global actions
export const storeSet = mapValuesKey('set', dashboardStore);
export default dashboardStore;