Total Complexity | 2 |
Complexity/F | 1 |
Lines of Code | 21 |
Function Count | 2 |
Duplicated Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | import RealTimeUpdates from '../RealTimeUpdates'; |
||
2 | import Settings from '../Settings'; |
||
3 | import { loadRealTimeUpdates, setRealTimeUpdates } from '../reducers/realTimeUpdates'; |
||
4 | import SettingsService from './SettingsService'; |
||
5 | |||
6 | const provideServices = (bottle, connect) => { |
||
7 | // Components |
||
8 | bottle.serviceFactory('Settings', Settings, 'RealTimeUpdates'); |
||
9 | |||
10 | bottle.serviceFactory('RealTimeUpdates', () => RealTimeUpdates); |
||
11 | bottle.decorator('RealTimeUpdates', connect([ 'realTimeUpdates' ], [ 'setRealTimeUpdates' ])); |
||
12 | |||
13 | // Services |
||
14 | bottle.service('SettingsService', SettingsService, 'Storage'); |
||
15 | |||
16 | // Actions |
||
17 | bottle.serviceFactory('setRealTimeUpdates', setRealTimeUpdates, 'SettingsService', 'loadRealTimeUpdates'); |
||
18 | bottle.serviceFactory('loadRealTimeUpdates', loadRealTimeUpdates, 'SettingsService'); |
||
19 | }; |
||
20 | |||
21 | export default provideServices; |
||
22 |