Skip to content

Commit

Permalink
Redux Middleware
Browse files Browse the repository at this point in the history
  • Loading branch information
15Dkatz committed Oct 24, 2022
1 parent 59f57fb commit a744642
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion evens-or-odds/src/actions/deck.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ export const fetchDeckResult = deckJson => {
return { type: FETCH_DECK_RESULT, remaining, deck_id };
}

export const fetchNewDeck = dispatch => {
export const fetchNewDeck = () => dispatch => {
return fetch('https://deck-of-cards-api-wrapper.appspot.com/deck/new/shuffle')
.then(response => response.json())
.then(json => dispatch(fetchDeckResult(json)));
Expand Down

0 comments on commit a744642

Please sign in to comment.