2023-04-23 21:23:45 +05:30
|
|
|
import { languageFilterData } from '~/search/sidebar/constants/language_filter_data';
|
2021-09-30 23:02:18 +05:30
|
|
|
import { GROUPS_LOCAL_STORAGE_KEY, PROJECTS_LOCAL_STORAGE_KEY } from './constants';
|
|
|
|
|
|
|
|
export const frequentGroups = (state) => {
|
|
|
|
return state.frequentItems[GROUPS_LOCAL_STORAGE_KEY];
|
|
|
|
};
|
|
|
|
|
|
|
|
export const frequentProjects = (state) => {
|
|
|
|
return state.frequentItems[PROJECTS_LOCAL_STORAGE_KEY];
|
|
|
|
};
|
2023-04-23 21:23:45 +05:30
|
|
|
|
|
|
|
export const langugageAggregationBuckets = (state) => {
|
|
|
|
return (
|
|
|
|
state.aggregations.data.find(
|
|
|
|
(aggregation) => aggregation.name === languageFilterData.filterParam,
|
|
|
|
)?.buckets || []
|
|
|
|
);
|
|
|
|
};
|