From a7446428540c246a0d099f25be82a7a0d7dc9359 Mon Sep 17 00:00:00 2001 From: David Katz <15Dkatz@shcp.edu> Date: Mon, 24 Oct 2022 10:19:22 -0700 Subject: [PATCH] Redux Middleware --- evens-or-odds/src/actions/deck.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/evens-or-odds/src/actions/deck.js b/evens-or-odds/src/actions/deck.js index 018dd25..5889d62 100644 --- a/evens-or-odds/src/actions/deck.js +++ b/evens-or-odds/src/actions/deck.js @@ -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)));