|
|
|
@ -96,9 +96,7 @@ function credentials(state: CredentialsType = {status: FetchStatus.Initial, valu
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function fetchCount(state: number = 0, action: any) {
|
|
|
|
|
// FIXME: Make it automatic by action properties.
|
|
|
|
|
switch (action.type) {
|
|
|
|
|
case Actions.FETCH_CREDENTIALS:
|
|
|
|
|
if ('status' in action) {
|
|
|
|
|
switch (action.status) {
|
|
|
|
|
case FetchStatus.Request:
|
|
|
|
|
return state + 1;
|
|
|
|
@ -108,6 +106,8 @@ function fetchCount(state: number = 0, action: any) {
|
|
|
|
|
default:
|
|
|
|
|
return state;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
switch (action.type) {
|
|
|
|
|
default:
|
|
|
|
|
return state;
|
|
|
|
|
}
|
|
|
|
|