Merge branch 'feat/inda-383-daily-stat' into 'main'
[ProtonMail-WebClient.git] / applications / calendar / src / app / store / rootReducer.ts
bloba6d9d80765ebddbc3cd12e80e051f6e20f888e3b
1 import { combineReducers } from '@reduxjs/toolkit';
3 import { oauthTokenReducer } from '@proton/activation/src/logic/oauthToken';
4 import {
5     calendarSettingsReducer,
6     calendarsBootstrapReducer,
7     calendarsReducer,
8     holidaysDirectoryReducer,
9 } from '@proton/calendar';
10 import { breachesCountReducer } from '@proton/components';
11 import { sharedPersistReducer, sharedReducers } from '@proton/redux-shared-store';
12 import { selectPersistModel } from '@proton/redux-utilities';
14 import { busySlotsReducer } from './busySlots/busySlotsSlice';
15 import { eventsReducer } from './events/eventsSlice';
17 export const rootReducer = combineReducers({
18     ...sharedReducers,
19     ...calendarsReducer,
20     ...calendarsBootstrapReducer,
21     ...calendarSettingsReducer,
22     ...holidaysDirectoryReducer,
23     ...busySlotsReducer,
24     ...breachesCountReducer,
25     ...eventsReducer,
26     ...oauthTokenReducer,
27 });
29 export type CalendarState = ReturnType<typeof rootReducer>;
31 export const persistReducer: Partial<{ [key in keyof CalendarState]: any }> = {
32     ...sharedPersistReducer,
33     calendarUserSettings: selectPersistModel,
34     calendars: selectPersistModel,
35     holidaysDirectory: selectPersistModel,