Make no. of communities per pagination / expansion configurable

Adds new config settings for no. of communities to display on the
home page & community-list page.

Resolves #1749, resolves #1750
This commit is contained in:
Mark Cooper
2022-08-30 15:40:43 -07:00
parent 31167a3ce4
commit 3e803e8411
7 changed files with 30 additions and 2 deletions

View File

@@ -23,6 +23,7 @@ import { followLink } from '../shared/utils/follow-link-config.model';
import { FlatNode } from './flat-node.model';
import { ShowMoreFlatNode } from './show-more-flat-node.model';
import { FindListOptions } from '../core/data/find-list-options.model';
import { environment } from 'src/environments/environment';
// Helper method to combine an flatten an array of observables of flatNode arrays
export const combineAndFlatten = (obsList: Observable<FlatNode[]>[]): Observable<FlatNode[]> =>
@@ -80,7 +81,7 @@ const communityListStateSelector = (state: AppState) => state.communityList;
const expandedNodesSelector = createSelector(communityListStateSelector, (communityList: CommunityListState) => communityList.expandedNodes);
const loadingNodeSelector = createSelector(communityListStateSelector, (communityList: CommunityListState) => communityList.loadingNode);
export const MAX_COMCOLS_PER_PAGE = 20;
export const MAX_COMCOLS_PER_PAGE = environment.browseCommunities.communityListPageSize;
/**
* Service class for the community list, responsible for the creating of the flat list used by communityList dataSource