This commit is contained in:
mgabdev
2020-04-17 01:35:46 -04:00
parent 35852e7fee
commit 4d7aee59c9
37 changed files with 568 additions and 319 deletions

View File

@@ -16,6 +16,7 @@ const initialState = ImmutableMap({
results: [],
chosenUrl: '',
searchText: '',
next: 0,
loading: false,
error: false,
})
@@ -27,7 +28,8 @@ export default function (state = initialState, action) {
return state.set('loading', true)
case GIF_RESULTS_FETCH_SUCCESS:
return state.withMutations(map => {
map.set('results', action.results);
map.set('results', action.data.results);
map.set('next', action.data.next);
map.set('error', false);
map.set('loading', false);
});