import { configureStore } from "@reduxjs/toolkit"; import { setupListeners } from "@reduxjs/toolkit/query"; import { sponserMaster } from "../Services/sponser.service"; import { investmentType } from "../Services/investment.type.service"; import { exchangeRate } from "../Services/exchange.rate.service"; import { ioService } from "../Services/io.service"; import { investorDetails } from "../Services/investor.details.service"; import { investorTransaction } from "../Services/investor.transaction.service"; import { api } from "../Services/api.service"; export const store = configureStore({ reducer: { [sponserMaster.reducerPath]: sponserMaster.reducer, [investmentType.reducerPath]: investmentType.reducer, [exchangeRate.reducerPath]: exchangeRate.reducer, [ioService.reducerPath]: ioService.reducer, [investorDetails.reducerPath]: investorDetails.reducer, [investorTransaction.reducerPath]: investorTransaction.reducer, // Add other reducers as needed }, middleware: (getDefaultMiddleware) => getDefaultMiddleware({ thunk: { extraArgument: api, // Pass Axios instance as extra argument }, }).concat( sponserMaster.middleware, investmentType.middleware, exchangeRate.middleware, ioService.middleware, investorDetails.middleware, investorTransaction.middleware ), }); setupListeners(store.dispatch); export default store;