diff options
author | Markus Hatvan <markus_hatvan@aon.at> | 2021-09-04 17:03:53 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-09-04 17:03:53 +0200 |
commit | f39cbe7d803245702885b308ab1cee4551aea9a1 (patch) | |
tree | 56d2e5dbe6242bb64b03ba5028b8bac39ea0c7ed /docs/example-feature/index.js | |
parent | Use namespaces when pulling docker base images since this is reqd for podman (diff) | |
download | ferdium-app-f39cbe7d803245702885b308ab1cee4551aea9a1.tar.gz ferdium-app-f39cbe7d803245702885b308ab1cee4551aea9a1.tar.zst ferdium-app-f39cbe7d803245702885b308ab1cee4551aea9a1.zip |
chore: remove what's new functionality (#1864)
Diffstat (limited to 'docs/example-feature/index.js')
-rw-r--r-- | docs/example-feature/index.js | 34 |
1 files changed, 0 insertions, 34 deletions
diff --git a/docs/example-feature/index.js b/docs/example-feature/index.js deleted file mode 100644 index 0ce068e26..000000000 --- a/docs/example-feature/index.js +++ /dev/null | |||
@@ -1,34 +0,0 @@ | |||
1 | import { reaction, runInAction } from 'mobx'; | ||
2 | import { ExampleFeatureStore } from './store'; | ||
3 | import state, { resetState } from './state'; | ||
4 | import api from './api'; | ||
5 | |||
6 | const debug = require('debug')('Ferdi:feature:EXAMPLE_FEATURE'); | ||
7 | |||
8 | let store = null; | ||
9 | |||
10 | export default function initAnnouncements(stores, actions) { | ||
11 | const { features } = stores; | ||
12 | |||
13 | // Toggle workspace feature | ||
14 | reaction( | ||
15 | () => ( | ||
16 | features.features.isExampleFeatureEnabled | ||
17 | ), | ||
18 | (isEnabled) => { | ||
19 | if (isEnabled) { | ||
20 | debug('Initializing `EXAMPLE_FEATURE` feature'); | ||
21 | store = new ExampleFeatureStore(stores, api, actions, state); | ||
22 | store.initialize(); | ||
23 | runInAction(() => { state.isFeatureActive = true; }); | ||
24 | } else if (store) { | ||
25 | debug('Disabling `EXAMPLE_FEATURE` feature'); | ||
26 | runInAction(() => { state.isFeatureActive = false; }); | ||
27 | store.teardown(); | ||
28 | store = null; | ||
29 | resetState(); // Reset state to default | ||
30 | } | ||
31 | }, | ||
32 | { fireImmediately: true }, | ||
33 | ); | ||
34 | } | ||