diff options
Diffstat (limited to 'src/features/serviceLimit/index.js')
-rw-r--r-- | src/features/serviceLimit/index.js | 31 |
1 files changed, 0 insertions, 31 deletions
diff --git a/src/features/serviceLimit/index.js b/src/features/serviceLimit/index.js deleted file mode 100644 index f867e3d87..000000000 --- a/src/features/serviceLimit/index.js +++ /dev/null | |||
@@ -1,31 +0,0 @@ | |||
1 | import { reaction } from 'mobx'; | ||
2 | import { ServiceLimitStore } from './store'; | ||
3 | |||
4 | const debug = require('debug')('Ferdi:feature:serviceLimit'); | ||
5 | |||
6 | let store = null; | ||
7 | |||
8 | export const serviceLimitStore = new ServiceLimitStore(); | ||
9 | |||
10 | export default function initServiceLimit(stores, actions) { | ||
11 | const { features } = stores; | ||
12 | |||
13 | // Toggle serviceLimit feature | ||
14 | reaction( | ||
15 | () => ( | ||
16 | features.features.isServiceLimitEnabled | ||
17 | ), | ||
18 | (isEnabled) => { | ||
19 | if (isEnabled) { | ||
20 | debug('Initializing `serviceLimit` feature'); | ||
21 | store = serviceLimitStore.start(stores, actions); | ||
22 | } else if (store) { | ||
23 | debug('Disabling `serviceLimit` feature'); | ||
24 | serviceLimitStore.stop(); | ||
25 | } | ||
26 | }, | ||
27 | { | ||
28 | fireImmediately: true, | ||
29 | }, | ||
30 | ); | ||
31 | } | ||