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