1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
import { cloneDeep } from 'lodash';
import { GROUPS_LOCAL_STORAGE_KEY, PROJECTS_LOCAL_STORAGE_KEY } from './constants';
const createState = ({ query, navigation, useSidebarNavigation }) => ({
urlQuery: cloneDeep(query),
query,
groups: [],
fetchingGroups: false,
projects: [],
fetchingProjects: false,
frequentItems: {
[GROUPS_LOCAL_STORAGE_KEY]: [],
[PROJECTS_LOCAL_STORAGE_KEY]: [],
},
sidebarDirty: false,
navigation,
useSidebarNavigation,
aggregations: {
error: false,
fetching: false,
data: [],
},
});
export default createState;
|