mirror of
https://github.com/kingomarnajjar/flex-template-web.git
synced 2026-07-27 19:42:11 +10:00
SearchPage uses storableError func and correct proptype validation.
This commit is contained in:
parent
f68cf153af
commit
347699de91
2 changed files with 7 additions and 6 deletions
|
|
@ -1,4 +1,5 @@
|
|||
import { unionWith } from 'lodash';
|
||||
import { storableError } from '../../util/errors';
|
||||
import { addMarketplaceEntities } from '../../ducks/marketplaceData.duck';
|
||||
|
||||
// ================ Action types ================ //
|
||||
|
|
@ -124,7 +125,7 @@ export const searchListings = searchParams => (dispatch, getState, sdk) => {
|
|||
return response;
|
||||
})
|
||||
.catch(e => {
|
||||
dispatch(searchListingsError(e));
|
||||
dispatch(searchListingsError(storableError(e)));
|
||||
throw e;
|
||||
});
|
||||
};
|
||||
|
|
@ -146,7 +147,7 @@ export const searchMapListings = searchParams => (dispatch, getState, sdk) => {
|
|||
return response;
|
||||
})
|
||||
.catch(e => {
|
||||
dispatch(searchMapListingsError(e));
|
||||
dispatch(searchMapListingsError(storableError(e)));
|
||||
throw e;
|
||||
});
|
||||
};
|
||||
|
|
|
|||
|
|
@ -354,19 +354,19 @@ SearchPageComponent.defaultProps = {
|
|||
tab: 'listings',
|
||||
};
|
||||
|
||||
const { array, bool, func, instanceOf, oneOf, object, shape, string } = PropTypes;
|
||||
const { array, bool, func, oneOf, object, shape, string } = PropTypes;
|
||||
|
||||
SearchPageComponent.propTypes = {
|
||||
authInfoError: instanceOf(Error),
|
||||
authInfoError: propTypes.error,
|
||||
listings: array,
|
||||
mapListings: array,
|
||||
logoutError: instanceOf(Error),
|
||||
logoutError: propTypes.error,
|
||||
onManageDisableScrolling: func.isRequired,
|
||||
onSearchMapListings: func.isRequired,
|
||||
pagination: propTypes.pagination,
|
||||
scrollingDisabled: bool.isRequired,
|
||||
searchInProgress: bool.isRequired,
|
||||
searchListingsError: instanceOf(Error),
|
||||
searchListingsError: propTypes.error,
|
||||
searchParams: object,
|
||||
tab: oneOf(['filters', 'listings', 'map']).isRequired,
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue