diff --git a/src/store/index.ts b/src/store/index.ts index 6b9fba03a4b81e92180d8dc1127a39c5ee37e39d..b703e919b028617eb7997a7dfe0a307c17ea0b75 100644 --- a/src/store/index.ts +++ b/src/store/index.ts @@ -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({ diff --git a/src/store/profileType/profileType.slice.ts b/src/store/profileType/profileType.slice.ts index ec4beee131b88a6874bcc00f1104cdd66409d613..e267f6fce5791f0abd351be67f24a1b1554e71ff 100644 --- a/src/store/profileType/profileType.slice.ts +++ b/src/store/profileType/profileType.slice.ts @@ -54,4 +54,3 @@ export const profileTypeSlice = createSlice({ }) export const { setProfileType } = profileTypeSlice.actions -export default profileTypeSlice.reducer