Merge branch 'fix-typo-drive' into 'main'
[ProtonMail-WebClient.git] / packages / redux-shared-store / sharedStore.ts
blob1a56b01a7c7aff4528177f18436fa45f7dd11930
1 import { configureStore } from '@reduxjs/toolkit';
3 import type { ProtonThunkArguments } from '@proton/redux-shared-store-types';
5 import { sharedReducers } from './sharedReducers';
7 export const extraThunkArguments = {} as ProtonThunkArguments;
9 export const baseConfigureStore = () => {
10     return configureStore({
11         reducer: sharedReducers,
12         middleware: (getDefaultMiddleware) =>
13             getDefaultMiddleware({
14                 thunk: { extraArgument: extraThunkArguments },
15             }),
16     });
19 export type SharedStore = ReturnType<typeof baseConfigureStore>;