MSP-3104 add roleService
This commit is contained in:
1 parent
e1afa417ee
commit
89151474b7
5 files changed
+111
-14
No files matched your search
@@ -3,8 +3,11 @@ import { theme } from 'antd'
|
||||
import { MapToken, SeedToken } from 'antd/es/theme/interface'
|
||||
import { createContext, Dispatch, SetStateAction } from 'react'
|
||||
|
||||
import roleApi from '@services/roleService.ts'
|
||||
|
||||
import profileReducer from './redusers/ProfileSlice.ts'
|
||||
|
||||
|
||||
export interface ContextProps {
|
||||
setTheme: Dispatch<
|
||||
SetStateAction<{ algorithm: (token: SeedToken) => MapToken }>
|
||||
@@ -16,12 +19,15 @@ export const Context = createContext<ContextProps>({
|
||||
})
|
||||
|
||||
const rootReducer = combineReducers({
|
||||
profileReducer
|
||||
profileReducer,
|
||||
[roleApi.reducerPath]: roleApi.reducer
|
||||
})
|
||||
|
||||
export const setupStore = () =>
|
||||
configureStore({
|
||||
reducer: rootReducer
|
||||
reducer: rootReducer,
|
||||
middleware: (getDefaultMiddleware) =>
|
||||
getDefaultMiddleware().concat([roleApi.middleware])
|
||||
})
|
||||
|
||||
export type RootState = ReturnType<typeof rootReducer>
|
||||
|
||||
Reference in new issue
Block a user