debian-mirror-gitlab/app/assets/javascripts/search/store/state.js

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

25 lines
536 B
JavaScript
Raw Normal View History

2021-12-11 22:18:48 +05:30
import { cloneDeep } from 'lodash';
2021-09-30 23:02:18 +05:30
import { GROUPS_LOCAL_STORAGE_KEY, PROJECTS_LOCAL_STORAGE_KEY } from './constants';
2023-01-13 00:05:48 +05:30
const createState = ({ query, navigation }) => ({
2021-12-11 22:18:48 +05:30
urlQuery: cloneDeep(query),
2021-01-03 14:25:43 +05:30
query,
2021-01-29 00:20:46 +05:30
groups: [],
fetchingGroups: false,
2021-02-22 17:27:13 +05:30
projects: [],
fetchingProjects: false,
2021-09-30 23:02:18 +05:30
frequentItems: {
[GROUPS_LOCAL_STORAGE_KEY]: [],
[PROJECTS_LOCAL_STORAGE_KEY]: [],
},
2021-12-11 22:18:48 +05:30
sidebarDirty: false,
2023-01-13 00:05:48 +05:30
navigation,
2023-04-23 21:23:45 +05:30
aggregations: {
error: false,
fetching: false,
data: [],
},
2021-01-03 14:25:43 +05:30
});
2023-04-23 21:23:45 +05:30
2021-01-03 14:25:43 +05:30
export default createState;