Replaced usages of defaultState by initialState

This commit is contained in:
Alejandro Celaya
2019-03-17 10:11:20 +01:00
parent 5bb9d15e27
commit 232c059e4f
8 changed files with 21 additions and 21 deletions

View File

@@ -10,11 +10,11 @@ export const shortUrlsListParamsType = PropTypes.shape({
searchTerm: PropTypes.string,
});
const defaultState = { page: '1' };
const initialState = { page: '1' };
export default handleActions({
[LIST_SHORT_URLS]: (state, { params }) => ({ ...state, ...params }),
[RESET_SHORT_URL_PARAMS]: () => defaultState,
}, defaultState);
[RESET_SHORT_URL_PARAMS]: () => initialState,
}, initialState);
export const resetShortUrlParams = createAction(RESET_SHORT_URL_PARAMS);