diff --git a/examples/files/exercises/PhotoGallery.js b/examples/files/exercises/PhotoGallery.js index f527680..07a3433 100644 --- a/examples/files/exercises/PhotoGallery.js +++ b/examples/files/exercises/PhotoGallery.js @@ -15,7 +15,7 @@ export default function App() { try { const nextPhotos = await getList(nextPage) - dispatch(actionCreators.success(nextPhotos, nextPage)) + dispatch(actionCreators.success(nextPhotos)) } catch (e) { dispatch(actionCreators.failure()) } diff --git a/examples/files/exercises/photos.js b/examples/files/exercises/photos.js index 444a978..a7312da 100644 --- a/examples/files/exercises/photos.js +++ b/examples/files/exercises/photos.js @@ -7,9 +7,9 @@ const types = { export const actionCreators = { loading: () => ({ type: types.LOADING }), failure: () => ({ type: types.FAILURE }), - success: (photos, page) => ({ + success: (photos) => ({ type: types.SUCCESS, - payload: { photos, page }, + payload: { photos }, }), } @@ -26,7 +26,6 @@ export function reducer(state, action) { return { ...state, loading: true, error: false } case types.SUCCESS: return { - ...state, loading: false, error: false, photos: [...state.photos, ...action.payload.photos],