aboutsummaryrefslogtreecommitdiffstats
path: root/src/features/todos/index.js
diff options
context:
space:
mode:
authorLibravatar Markus Hatvan <markus_hatvan@aon.at>2021-10-02 09:24:32 +0200
committerLibravatar GitHub <noreply@github.com>2021-10-02 09:24:32 +0200
commitbfe8847d72cd0893230f2e654242658214943e61 (patch)
tree3384b02ebad7a74cbb106ddd95546e0e24ff0bb8 /src/features/todos/index.js
parentfix: Fix navigation shortcut accelerator for non-macos (fixes #1172) (#2012) (diff)
downloadferdium-app-bfe8847d72cd0893230f2e654242658214943e61.tar.gz
ferdium-app-bfe8847d72cd0893230f2e654242658214943e61.tar.zst
ferdium-app-bfe8847d72cd0893230f2e654242658214943e61.zip
chore: convert various files from JS to TS (#2010)
Diffstat (limited to 'src/features/todos/index.js')
-rw-r--r--src/features/todos/index.js28
1 files changed, 0 insertions, 28 deletions
diff --git a/src/features/todos/index.js b/src/features/todos/index.js
deleted file mode 100644
index 573190881..000000000
--- a/src/features/todos/index.js
+++ /dev/null
@@ -1,28 +0,0 @@
1import { reaction } from 'mobx';
2import TodoStore from './store';
3
4const debug = require('debug')('Ferdi:feature:todos');
5
6export const todosStore = new TodoStore();
7
8export default function initTodos(stores, actions) {
9 stores.todos = todosStore;
10 const { features } = stores;
11
12 // Toggle todos feature
13 reaction(
14 () => (
15 features.features.isTodosEnabled
16 ),
17 (isEnabled) => {
18 if (isEnabled) {
19 debug('Initializing `todos` feature');
20 todosStore.start(stores, actions);
21 } else if (todosStore.isFeatureActive) {
22 debug('Disabling `todos` feature');
23 todosStore.stop();
24 }
25 },
26 { fireImmediately: true },
27 );
28}