update users module to use new pending and error state

This commit is contained in:
Sebastian Sdorra
2018-07-30 13:38:15 +02:00
parent 9e029c0c5c
commit 7be1366c1a
14 changed files with 274 additions and 443 deletions

View File

@@ -34,7 +34,11 @@ export default function reducer(state: Object = {}, action: Action): Object {
} else {
const matches = RESET_PATTERN.exec(type);
if (matches) {
return removeFromState(state, matches[1]);
let identifier = matches[1];
if (action.itemId) {
identifier += "/" + action.itemId;
}
return removeFromState(state, identifier);
}
}
return state;