Co-authored-by: scott@signal.org
Co-authored-by: ken@signal.org
This commit is contained in:
Ken Powers 2019-05-16 15:32:11 -07:00 committed by Scott Nonnenberg
parent 8c8856785b
commit 29de50c12a
100 changed files with 7572 additions and 693 deletions

View file

@ -1,3 +1,4 @@
import { AnyAction } from 'redux';
import { omit, reject } from 'lodash';
import { normalize } from '../../types/PhoneNumber';
@ -63,6 +64,7 @@ type ClearSearchActionType = {
};
export type SEARCH_TYPES =
| AnyAction
| SearchResultsFulfilledActionType
| UpdateSearchTermActionType
| ClearSearchActionType
@ -218,13 +220,9 @@ function getEmptyState(): SearchStateType {
}
export function reducer(
state: SearchStateType | undefined,
state: SearchStateType = getEmptyState(),
action: SEARCH_TYPES
): SearchStateType {
if (!state) {
return getEmptyState();
}
if (action.type === 'SEARCH_CLEAR') {
return getEmptyState();
}