diff options
author | Markus Hatvan <markus_hatvan@aon.at> | 2021-10-02 09:24:32 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-10-02 09:24:32 +0200 |
commit | bfe8847d72cd0893230f2e654242658214943e61 (patch) | |
tree | 3384b02ebad7a74cbb106ddd95546e0e24ff0bb8 /src/features/communityRecipes | |
parent | fix: Fix navigation shortcut accelerator for non-macos (fixes #1172) (#2012) (diff) | |
download | ferdium-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/communityRecipes')
-rw-r--r-- | src/features/communityRecipes/store.ts (renamed from src/features/communityRecipes/store.js) | 23 |
1 files changed, 15 insertions, 8 deletions
diff --git a/src/features/communityRecipes/store.js b/src/features/communityRecipes/store.ts index 05e18e2f7..a8d358ba0 100644 --- a/src/features/communityRecipes/store.js +++ b/src/features/communityRecipes/store.ts | |||
@@ -4,7 +4,11 @@ import { FeatureStore } from '../utils/FeatureStore'; | |||
4 | const debug = require('debug')('Ferdi:feature:communityRecipes:store'); | 4 | const debug = require('debug')('Ferdi:feature:communityRecipes:store'); |
5 | 5 | ||
6 | export class CommunityRecipesStore extends FeatureStore { | 6 | export class CommunityRecipesStore extends FeatureStore { |
7 | start(stores, actions) { | 7 | stores: any; |
8 | |||
9 | actions: any; | ||
10 | |||
11 | start(stores: any, actions: any) { | ||
8 | debug('start'); | 12 | debug('start'); |
9 | this.stores = stores; | 13 | this.stores = stores; |
10 | this.actions = actions; | 14 | this.actions = actions; |
@@ -18,14 +22,17 @@ export class CommunityRecipesStore extends FeatureStore { | |||
18 | @computed get communityRecipes() { | 22 | @computed get communityRecipes() { |
19 | if (!this.stores) return []; | 23 | if (!this.stores) return []; |
20 | 24 | ||
21 | return this.stores.recipePreviews.dev.map(recipePreview => { | 25 | return this.stores.recipePreviews.dev.map( |
22 | // TODO: Need to figure out if this is even necessary/used | 26 | (recipePreview: { isDevRecipe: boolean; author: any[] }) => { |
23 | recipePreview.isDevRecipe = !!recipePreview.author.some( | 27 | // TODO: Need to figure out if this is even necessary/used |
24 | author => author.email === this.stores.user.data.email, | 28 | recipePreview.isDevRecipe = !!recipePreview.author.some( |
25 | ); | 29 | (author: { email: any }) => |
30 | author.email === this.stores.user.data.email, | ||
31 | ); | ||
26 | 32 | ||
27 | return recipePreview; | 33 | return recipePreview; |
28 | }); | 34 | }, |
35 | ); | ||
29 | } | 36 | } |
30 | } | 37 | } |
31 | 38 | ||