|
|
@ -1,11 +1,14 @@ |
|
|
|
import { configureStore, getDefaultMiddleware } from '@reduxjs/toolkit'; |
|
|
|
import { drizzleReducers, drizzleMiddlewares, generateContractsInitialState } from '@ezerous/drizzle'; |
|
|
|
import { breezeReducers } from '@ezerous/breeze'; |
|
|
|
import { |
|
|
|
drizzleReducers, drizzleMiddlewares, generateContractsInitialState, Drizzle, |
|
|
|
} from '@ezerous/drizzle'; |
|
|
|
import { Breeze, breezeReducers } from '@ezerous/breeze'; |
|
|
|
import createSagaMiddleware from 'redux-saga'; |
|
|
|
import userReducer from './reducers/userReducer'; |
|
|
|
import rootSaga from './sagas/rootSaga'; |
|
|
|
import drizzleOptions from '../options/drizzleOptions'; |
|
|
|
import peerDbReplicationReducer from './reducers/peerDbReplicationReducer'; |
|
|
|
import breezeOptions from '../options/breezeOptions'; |
|
|
|
|
|
|
|
const initialState = { |
|
|
|
contracts: generateContractsInitialState(drizzleOptions), |
|
|
@ -24,5 +27,8 @@ const store = configureStore({ |
|
|
|
preloadedState: initialState, |
|
|
|
}); |
|
|
|
|
|
|
|
export const drizzle = new Drizzle(drizzleOptions, store); |
|
|
|
export const breeze = new Breeze(breezeOptions, store); |
|
|
|
|
|
|
|
sagaMiddleware.run(rootSaga); |
|
|
|
export default store; |
|
|
|