From 207ce0e281bd04521146efe54a6dc943dc58aca1 Mon Sep 17 00:00:00 2001 From: Apostolof Date: Sat, 14 Nov 2020 18:00:43 +0200 Subject: [PATCH] Remove drizzle and breeze context --- packages/concordia-app/src/index.jsx | 12 +----------- packages/concordia-app/src/redux/store.js | 10 ++++++++-- 2 files changed, 9 insertions(+), 13 deletions(-) diff --git a/packages/concordia-app/src/index.jsx b/packages/concordia-app/src/index.jsx index 536fd4c..0e89763 100644 --- a/packages/concordia-app/src/index.jsx +++ b/packages/concordia-app/src/index.jsx @@ -1,24 +1,14 @@ import './utils/wdyr'; import React, { Suspense } from 'react'; import { render } from 'react-dom'; -import { Drizzle } from '@ezerous/drizzle'; -import { Breeze } from '@ezerous/breeze'; import App from './App'; import store from './redux/store'; -import AppContext from './components/AppContext'; -import drizzleOptions from './options/drizzleOptions'; -import breezeOptions from './options/breezeOptions'; import * as serviceWorker from './utils/serviceWorker'; import LoadingScreen from './components/LoadingScreen'; -const drizzle = new Drizzle(drizzleOptions, store); -const breeze = new Breeze(breezeOptions, store); - render( }> - - - + , document.getElementById('root'), ); diff --git a/packages/concordia-app/src/redux/store.js b/packages/concordia-app/src/redux/store.js index d0f75f0..8ed1b9e 100644 --- a/packages/concordia-app/src/redux/store.js +++ b/packages/concordia-app/src/redux/store.js @@ -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;