From f39cbe7d803245702885b308ab1cee4551aea9a1 Mon Sep 17 00:00:00 2001 From: Markus Hatvan Date: Sat, 4 Sep 2021 17:03:53 +0200 Subject: chore: remove what's new functionality (#1864) --- docs/example-feature/index.js | 34 ---------------------------------- 1 file changed, 34 deletions(-) delete mode 100644 docs/example-feature/index.js (limited to 'docs/example-feature') 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 @@ -import { reaction, runInAction } from 'mobx'; -import { ExampleFeatureStore } from './store'; -import state, { resetState } from './state'; -import api from './api'; - -const debug = require('debug')('Ferdi:feature:EXAMPLE_FEATURE'); - -let store = null; - -export default function initAnnouncements(stores, actions) { - const { features } = stores; - - // Toggle workspace feature - reaction( - () => ( - features.features.isExampleFeatureEnabled - ), - (isEnabled) => { - if (isEnabled) { - debug('Initializing `EXAMPLE_FEATURE` feature'); - store = new ExampleFeatureStore(stores, api, actions, state); - store.initialize(); - runInAction(() => { state.isFeatureActive = true; }); - } else if (store) { - debug('Disabling `EXAMPLE_FEATURE` feature'); - runInAction(() => { state.isFeatureActive = false; }); - store.teardown(); - store = null; - resetState(); // Reset state to default - } - }, - { fireImmediately: true }, - ); -} -- cgit v1.2.3-70-g09d2