import { configureStore } from '@reduxjs/toolkit' ; import { api } from './services/auth' ; import authReducer from '../features/auth/authSlice' ; export const store = configureStore ( { reducer : { [ api . reducerPath ] : api . reducer , auth : authReducer , } , middleware : ( getDefaultMiddleware ) => getDefaultMiddleware ( ) . concat ( api . middleware ) , } ) ; export type RootState = ReturnType < typeof store . getState > ; export type AppDispatch = typeof store . dispatch ;