2020-12-28 17:08:08 +00:00
|
|
|
import { createContextStore } from 'easy-peasy';
|
|
|
|
import { composeWithDevTools } from 'redux-devtools-extension';
|
2021-01-01 22:55:30 +00:00
|
|
|
|
2021-01-01 00:27:16 +00:00
|
|
|
import nests, { AdminNestStore } from '@/state/admin/nests';
|
2020-12-28 17:08:08 +00:00
|
|
|
import roles, { AdminRoleStore } from '@/state/admin/roles';
|
|
|
|
|
|
|
|
interface AdminStore {
|
2021-01-01 00:27:16 +00:00
|
|
|
nests: AdminNestStore
|
2020-12-28 17:08:08 +00:00
|
|
|
roles: AdminRoleStore;
|
|
|
|
}
|
|
|
|
|
|
|
|
export const AdminContext = createContextStore<AdminStore>({
|
2021-01-01 00:27:16 +00:00
|
|
|
nests,
|
2020-12-28 17:08:08 +00:00
|
|
|
roles,
|
|
|
|
}, {
|
|
|
|
compose: composeWithDevTools({
|
|
|
|
name: 'AdminStore',
|
|
|
|
trace: true,
|
|
|
|
}),
|
|
|
|
});
|