Created single reducer to handle settings

This commit is contained in:
Alejandro Celaya
2020-04-26 13:00:23 +02:00
parent 3953e98a77
commit bbc47b387e
11 changed files with 40 additions and 32 deletions

View File

@@ -1,6 +1,6 @@
import RealTimeUpdates from '../RealTimeUpdates';
import Settings from '../Settings';
import { loadRealTimeUpdates, setRealTimeUpdates } from '../reducers/realTimeUpdates';
import { loadRealTimeUpdates, setRealTimeUpdates } from '../reducers/settings';
import SettingsService from './SettingsService';
const provideServices = (bottle, connect) => {
@@ -8,7 +8,7 @@ const provideServices = (bottle, connect) => {
bottle.serviceFactory('Settings', Settings, 'RealTimeUpdates');
bottle.serviceFactory('RealTimeUpdates', () => RealTimeUpdates);
bottle.decorator('RealTimeUpdates', connect([ 'realTimeUpdates' ], [ 'setRealTimeUpdates' ]));
bottle.decorator('RealTimeUpdates', connect([ 'settings' ], [ 'setRealTimeUpdates' ]));
// Services
bottle.service('SettingsService', SettingsService, 'Storage');