webpack/scenes/AnsibleCollections/AnsibleCollectionsReducer.js in katello-4.4.0.rc1 vs webpack/scenes/AnsibleCollections/AnsibleCollectionsReducer.js in katello-4.4.0.rc2
- old
+ new
@@ -7,33 +7,33 @@
const initialState = initialApiState;
export default (state = initialState, action) => {
switch (action.type) {
- case ANSIBLE_COLLECTIONS_REQUEST: {
- return state.set('loading', true);
- }
- case ANSIBLE_COLLECTIONS_SUCCESS: {
- const {
- results, page, per_page, subtotal, // eslint-disable-line camelcase
- } = action.response;
- return state.merge({
- results,
- loading: false,
- pagination: {
- page: Number(page),
- perPage: Number(per_page || state.pagination.perPage), // eslint-disable-line camelcase
- },
- itemCount: Number(subtotal),
- });
- }
- case ANSIBLE_COLLECTIONS_ERROR: {
- return state.merge({
- error: action.error,
- loading: false,
- });
- }
- default: {
- return state;
- }
+ case ANSIBLE_COLLECTIONS_REQUEST: {
+ return state.set('loading', true);
+ }
+ case ANSIBLE_COLLECTIONS_SUCCESS: {
+ const {
+ results, page, per_page, subtotal, // eslint-disable-line camelcase
+ } = action.response;
+ return state.merge({
+ results,
+ loading: false,
+ pagination: {
+ page: Number(page),
+ perPage: Number(per_page || state.pagination.perPage), // eslint-disable-line camelcase
+ },
+ itemCount: Number(subtotal),
+ });
+ }
+ case ANSIBLE_COLLECTIONS_ERROR: {
+ return state.merge({
+ error: action.error,
+ loading: false,
+ });
+ }
+ default: {
+ return state;
+ }
}
};