-
-
Save wsalazar-ias/ac7ef0527f41bd00889b44e00594755f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
switch (action.type) { | |
case CLIENTS_FIND: | |
const response = action.payload.data; | |
return state.withMutations(map => { | |
map | |
.set('status', 'processed') | |
.set('keyword', response.keyword) | |
.set('countClients', response.countClients) | |
.set('responseClients', JSON.parse(response.listClients)); | |
}) | |
break; | |
case CHANGE_PAGE: | |
return state.set('page', action.currentPage); | |
break; | |
case CHANGE_KEYWORD: | |
return state.set('keyword', action.keyword); | |
break; | |
default: | |
return state; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment