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
Branches
No related tags found
2 merge requests!9322.5,!914chore(redux-rtk): add actions to redux extension
......@@ -66,7 +66,15 @@ export interface AppStore {
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 =
| AnalysisActionTypes
| ChallengeActionTypes
......@@ -81,7 +89,8 @@ const sentryReduxEnhancer = Sentry.createReduxEnhancer({})
const configureStore = (client: Client, persistedState: any) => {
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(
combineReducers({
......
......@@ -54,4 +54,3 @@ export const profileTypeSlice = createSlice({
})
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