aboutsummaryrefslogtreecommitdiffstats
path: root/src/components/settings
diff options
context:
space:
mode:
authorLibravatar Vijay A <vraravam@users.noreply.github.com>2022-05-14 08:50:02 -0500
committerLibravatar Vijay A <vraravam@users.noreply.github.com>2022-05-14 08:50:02 -0500
commit8b1bfc356c3182c481394251f3ceeb902f2baec3 (patch)
tree5beeee82ccc2981cf989bb9e192bc3c1f53f1ae9 /src/components/settings
parent6.0.0-nightly.34 [skip ci] (diff)
downloadferdium-app-8b1bfc356c3182c481394251f3ceeb902f2baec3.tar.gz
ferdium-app-8b1bfc356c3182c481394251f3ceeb902f2baec3.tar.zst
ferdium-app-8b1bfc356c3182c481394251f3ceeb902f2baec3.zip
Typescript conversion
Diffstat (limited to 'src/components/settings')
-rw-r--r--src/components/settings/recipes/RecipeItem.tsx (renamed from src/components/settings/recipes/RecipeItem.js)13
1 files changed, 6 insertions, 7 deletions
diff --git a/src/components/settings/recipes/RecipeItem.js b/src/components/settings/recipes/RecipeItem.tsx
index df5b42222..1dfe88683 100644
--- a/src/components/settings/recipes/RecipeItem.js
+++ b/src/components/settings/recipes/RecipeItem.tsx
@@ -1,15 +1,14 @@
1import { Component } from 'react'; 1import { Component } from 'react';
2import PropTypes from 'prop-types';
3import { observer } from 'mobx-react'; 2import { observer } from 'mobx-react';
4 3
5import RecipePreviewModel from '../../../models/RecipePreview'; 4import RecipePreviewModel from '../../../models/RecipePreview';
6 5
7class RecipeItem extends Component { 6type Props = {
8 static propTypes = { 7 recipe: RecipePreviewModel;
9 recipe: PropTypes.instanceOf(RecipePreviewModel).isRequired, 8 onClick: () => {};
10 onClick: PropTypes.func.isRequired, 9};
11 };
12 10
11class RecipeItem extends Component<Props> {
13 render() { 12 render() {
14 const { recipe, onClick } = this.props; 13 const { recipe, onClick } = this.props;
15 14
@@ -18,7 +17,7 @@ class RecipeItem extends Component {
18 {recipe.isDevRecipe && ( 17 {recipe.isDevRecipe && (
19 <span className="recipe-teaser__dev-badge">dev</span> 18 <span className="recipe-teaser__dev-badge">dev</span>
20 )} 19 )}
21 <img src={recipe.icons.svg} className="recipe-teaser__icon" alt="" /> 20 <img src={recipe.icon} className="recipe-teaser__icon" alt="" />
22 <span className="recipe-teaser__label">{recipe.name}</span> 21 <span className="recipe-teaser__label">{recipe.name}</span>
23 {recipe.aliases && recipe.aliases.length > 0 && ( 22 {recipe.aliases && recipe.aliases.length > 0 && (
24 <span className="recipe-teaser__alias_label"> 23 <span className="recipe-teaser__alias_label">