mirror of
https://github.com/ershisan99/flashcards-example-project.git
synced 2025-12-17 20:59:31 +00:00
add store and base api
This commit is contained in:
13
src/services/store.ts
Normal file
13
src/services/store.ts
Normal file
@@ -0,0 +1,13 @@
|
||||
import { configureStore } from '@reduxjs/toolkit'
|
||||
|
||||
import { api } from '@/services/auth'
|
||||
|
||||
export const store = configureStore({
|
||||
reducer: {
|
||||
[api.reducerPath]: api.reducer,
|
||||
},
|
||||
middleware: getDefaultMiddleware => getDefaultMiddleware().concat(api.middleware),
|
||||
})
|
||||
|
||||
export type AppDispatch = typeof store.dispatch
|
||||
export type RootState = ReturnType<typeof store.getState>
|
||||
Reference in New Issue
Block a user