aboutsummaryrefslogtreecommitdiffstats
path: root/src/stores/FeaturesStore.js
diff options
context:
space:
mode:
authorLibravatar haraldox <hnaumann+github@gmail.com>2018-02-26 11:52:11 +0100
committerLibravatar haraldox <hnaumann+github@gmail.com>2018-02-26 11:52:11 +0100
commit31820727240772a049c6af71742baa8e50039cda (patch)
tree3647701f523ebdf0cd3d9bbdb88574a7b3d8081d /src/stores/FeaturesStore.js
parentMerge pull request #721 from meetfranz/i18n (diff)
downloadferdium-app-31820727240772a049c6af71742baa8e50039cda.tar.gz
ferdium-app-31820727240772a049c6af71742baa8e50039cda.tar.zst
ferdium-app-31820727240772a049c6af71742baa8e50039cda.zip
initial commit
Diffstat (limited to 'src/stores/FeaturesStore.js')
-rw-r--r--src/stores/FeaturesStore.js18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/stores/FeaturesStore.js b/src/stores/FeaturesStore.js
new file mode 100644
index 000000000..5f738557f
--- /dev/null
+++ b/src/stores/FeaturesStore.js
@@ -0,0 +1,18 @@
1import { action, computed, observable } from 'mobx';
2
3import Store from './lib/Store';
4import CachedRequest from './lib/CachedRequest';
5import Request from './lib/Request';
6
7export default class RecipesStore extends Store {
8 @observable defaultFeaturesRequest = new CachedRequest(this.api.features, 'defaults');
9
10 setup() {
11 return this.defaults;
12 }
13
14 @computed get defaults() {
15 console.log('GETTING DEFAULTS')
16 return this.defaultFeaturesRequest.execute().result || [];
17 }
18}