diff options
author | haraldox <hnaumann+github@gmail.com> | 2018-02-26 11:52:11 +0100 |
---|---|---|
committer | haraldox <hnaumann+github@gmail.com> | 2018-02-26 11:52:11 +0100 |
commit | 31820727240772a049c6af71742baa8e50039cda (patch) | |
tree | 3647701f523ebdf0cd3d9bbdb88574a7b3d8081d /src/stores/FeaturesStore.js | |
parent | Merge pull request #721 from meetfranz/i18n (diff) | |
download | ferdium-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.js | 18 |
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 @@ | |||
1 | import { action, computed, observable } from 'mobx'; | ||
2 | |||
3 | import Store from './lib/Store'; | ||
4 | import CachedRequest from './lib/CachedRequest'; | ||
5 | import Request from './lib/Request'; | ||
6 | |||
7 | export 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 | } | ||