From 6439e23a55f306980c7f32c0f30aa018255d6d0a Mon Sep 17 00:00:00 2001 From: Stardust Date: Thu, 24 Nov 2022 08:17:56 -0600 Subject: [PATCH] Add fetch middleware with redux toolkit --- src/redux/store.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/redux/store.js b/src/redux/store.js index 7c2066a..1ce93e3 100644 --- a/src/redux/store.js +++ b/src/redux/store.js @@ -1,9 +1,13 @@ import { configureStore } from '@reduxjs/toolkit'; import playerReducer from './features/playerSlice'; +import { shazamCoreApi } from './services/shazamCore'; export const store = configureStore({ reducer: { + [shazamCoreApi.reducerPath]: shazamCoreApi.reducer, player: playerReducer, }, + middleware: (getDefaultMiddleware) => + getDefaultMiddleware().concat(shazamCoreApi.middleware), });