export interface CollectionPanelState {
item: CollectionResource | null;
- numberOfCollectionsWithSamePDH: number;
+ loadBigCollections: boolean;
}
const initialState = {
item: null,
- numberOfCollectionsWithSamePDH: 0
+ loadBigCollections: false,
};
export const collectionPanelReducer = (state: CollectionPanelState = initialState, action: CollectionPanelAction) =>
collectionPanelActions.match(action, {
default: () => state,
- SET_COLLECTION: (item) => ({ ...state, item }),
+ SET_COLLECTION: (item) => ({
+ ...state,
+ item,
+ loadBigCollections: false,
+ }),
LOAD_COLLECTION_SUCCESS: ({ item }) => ({ ...state, item }),
- SET_NUMBER_OF_COLLECTIONS_WITH_SAME_PDH: (num) => ({ ...state, numberOfCollectionsWithSamePDH: num }),
+ LOAD_BIG_COLLECTIONS: (loadBigCollections) => ({ ...state, loadBigCollections}),
});