aboutsummaryrefslogtreecommitdiffstats
path: root/src/stores
diff options
context:
space:
mode:
authorLibravatar kytwb <kytwb@pm.me>2022-01-02 00:40:42 +0100
committerLibravatar kytwb <kytwb@pm.me>2022-01-02 00:40:42 +0100
commit55dd67d28e691338b4ecbe928436c4f2a41ad5cb (patch)
treeb73fa0fb7398673c936888f72c8027456bfb463f /src/stores
parentRevert "Removed 'Most Popular' services since it alludes to user-tracking (#1... (diff)
downloadferdium-app-55dd67d28e691338b4ecbe928436c4f2a41ad5cb.tar.gz
ferdium-app-55dd67d28e691338b4ecbe928436c4f2a41ad5cb.tar.zst
ferdium-app-55dd67d28e691338b4ecbe928436c4f2a41ad5cb.zip
Revert "Removed straggling code related to popular services."
Diffstat (limited to 'src/stores')
-rw-r--r--src/stores/RecipePreviewsStore.js11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/stores/RecipePreviewsStore.js b/src/stores/RecipePreviewsStore.js
index e01e8fc6f..ef0bca430 100644
--- a/src/stores/RecipePreviewsStore.js
+++ b/src/stores/RecipePreviewsStore.js
@@ -10,10 +10,9 @@ export default class RecipePreviewsStore extends Store {
10 'all', 10 'all',
11 ); 11 );
12 12
13 @observable searchRecipePreviewsRequest = new Request( 13 @observable featuredRecipePreviewsRequest = new CachedRequest(this.api.recipePreviews, 'featured');
14 this.api.recipePreviews, 14
15 'search', 15 @observable searchRecipePreviewsRequest = new Request(this.api.recipePreviews, 'search');
16 );
17 16
18 constructor(...args) { 17 constructor(...args) {
19 super(...args); 18 super(...args);
@@ -26,6 +25,10 @@ export default class RecipePreviewsStore extends Store {
26 return this.allRecipePreviewsRequest.execute().result || []; 25 return this.allRecipePreviewsRequest.execute().result || [];
27 } 26 }
28 27
28 @computed get featured() {
29 return this.featuredRecipePreviewsRequest.execute().result || [];
30 }
31
29 @computed get searchResults() { 32 @computed get searchResults() {
30 return this.searchRecipePreviewsRequest.result || []; 33 return this.searchRecipePreviewsRequest.result || [];
31 } 34 }