Skip to content
Snippets Groups Projects
Commit ec4b266d authored by Bastien DUMONT's avatar Bastien DUMONT :angel:
Browse files

Merge branch 'rtk-actions' into 'dev'

chore(redux-rtk): add actions to redux extension

See merge request !914
parents ff147e4a ad7c13e6
No related branches found
No related tags found
2 merge requests!9322.5,!914chore(redux-rtk): add actions to redux extension
...@@ -66,7 +66,15 @@ export interface AppStore { ...@@ -66,7 +66,15 @@ export interface AppStore {
cozy: unknown cozy: unknown
} }
// todo refactor types ? const appActions = {
...analysisSlice.actions,
...challengeSlice.actions,
...chartSlice.actions,
...modalSlice.actions,
...profileTypeSlice.actions,
}
// TODO refactor types with AppActionsTypes = typeof appActions
export type AppActionsTypes = export type AppActionsTypes =
| AnalysisActionTypes | AnalysisActionTypes
| ChallengeActionTypes | ChallengeActionTypes
...@@ -81,7 +89,8 @@ const sentryReduxEnhancer = Sentry.createReduxEnhancer({}) ...@@ -81,7 +89,8 @@ const sentryReduxEnhancer = Sentry.createReduxEnhancer({})
const configureStore = (client: Client, persistedState: any) => { const configureStore = (client: Client, persistedState: any) => {
const middlewares = [thunkMiddleware.withExtraArgument({ client })] const middlewares = [thunkMiddleware.withExtraArgument({ client })]
const composeEnhancers = composeWithDevTools({ trace: true }) || compose const composeEnhancers =
composeWithDevTools({ trace: true, actionCreators: appActions }) || compose
const store: Store<AppStore, AppActionsTypes> = createStore( const store: Store<AppStore, AppActionsTypes> = createStore(
combineReducers({ combineReducers({
......
...@@ -54,4 +54,3 @@ export const profileTypeSlice = createSlice({ ...@@ -54,4 +54,3 @@ export const profileTypeSlice = createSlice({
}) })
export const { setProfileType } = profileTypeSlice.actions export const { setProfileType } = profileTypeSlice.actions
export default profileTypeSlice.reducer
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment