ISSUE-825 Improve refresh without WS (#826)

This commit is contained in:
Benoit TELLIER
2026-04-24 10:05:42 +02:00
committed by GitHub
parent 126fac845b
commit 138cfd7f4e
6 changed files with 165 additions and 19 deletions
+4 -1
View File
@@ -1,4 +1,5 @@
import eventsCalendar from '@/features/Calendars/CalendarSlice'
import { postMutationRefreshMiddleware } from '@/features/Calendars/listeners/postMutationRefresh'
import searchResultReducer from '@/features/Search/SearchSlice'
import settingsReducer from '@/features/Settings/SettingsSlice'
import userReducer from '@/features/User/userSlice'
@@ -24,7 +25,9 @@ export const setupStore = (preloadedState?: Partial<RootState>) => {
reducer: rootReducer,
preloadedState,
middleware: getDefaultMiddleware =>
getDefaultMiddleware().concat(routerMiddleware)
getDefaultMiddleware()
.concat(routerMiddleware)
.prepend(postMutationRefreshMiddleware.middleware)
})
}