diff options
author | Nathanaƫl Houn <contact@nathanaelhoun.fr> | 2022-05-15 23:42:36 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-05-15 23:42:36 +0200 |
commit | ed2e034b12b15c5b4ac638e6b89a4ee9a7ed5012 (patch) | |
tree | e51d99224a111a02e9ce0f39ea9762387be2950a /src/components/settings/recipes/RecipeItem.tsx | |
parent | Extracted ImageHelper and ImageController from ServiceController for reuse (diff) | |
download | ferdium-app-ed2e034b12b15c5b4ac638e6b89a4ee9a7ed5012.tar.gz ferdium-app-ed2e034b12b15c5b4ac638e6b89a4ee9a7ed5012.tar.zst ferdium-app-ed2e034b12b15c5b4ac638e6b89a4ee9a7ed5012.zip |
fix: revert "Typescript conversion" (#153)
This reverts commit 8b1bfc356c3182c481394251f3ceeb902f2baec3.
Diffstat (limited to 'src/components/settings/recipes/RecipeItem.tsx')
-rw-r--r-- | src/components/settings/recipes/RecipeItem.tsx | 32 |
1 files changed, 0 insertions, 32 deletions
diff --git a/src/components/settings/recipes/RecipeItem.tsx b/src/components/settings/recipes/RecipeItem.tsx deleted file mode 100644 index 1dfe88683..000000000 --- a/src/components/settings/recipes/RecipeItem.tsx +++ /dev/null | |||
@@ -1,32 +0,0 @@ | |||
1 | import { Component } from 'react'; | ||
2 | import { observer } from 'mobx-react'; | ||
3 | |||
4 | import RecipePreviewModel from '../../../models/RecipePreview'; | ||
5 | |||
6 | type Props = { | ||
7 | recipe: RecipePreviewModel; | ||
8 | onClick: () => {}; | ||
9 | }; | ||
10 | |||
11 | class RecipeItem extends Component<Props> { | ||
12 | render() { | ||
13 | const { recipe, onClick } = this.props; | ||
14 | |||
15 | return ( | ||
16 | <button type="button" className="recipe-teaser" onClick={onClick}> | ||
17 | {recipe.isDevRecipe && ( | ||
18 | <span className="recipe-teaser__dev-badge">dev</span> | ||
19 | )} | ||
20 | <img src={recipe.icon} className="recipe-teaser__icon" alt="" /> | ||
21 | <span className="recipe-teaser__label">{recipe.name}</span> | ||
22 | {recipe.aliases && recipe.aliases.length > 0 && ( | ||
23 | <span className="recipe-teaser__alias_label"> | ||
24 | {`Aliases: ${recipe.aliases.join(', ')}`} | ||
25 | </span> | ||
26 | )} | ||
27 | </button> | ||
28 | ); | ||
29 | } | ||
30 | } | ||
31 | |||
32 | export default observer(RecipeItem); | ||