diff options
author | muhamedsalih-tw <104364298+muhamedsalih-tw@users.noreply.github.com> | 2022-10-27 07:13:47 +0530 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-10-27 01:43:47 +0000 |
commit | 81c43ecc3d17e0dbf7ad1d949b6d977f2c65bd48 (patch) | |
tree | dfa7c08cb54fb81b7d2e788d350de52c2ebd05d2 /src/components/settings/recipes/RecipeItem.js | |
parent | 6.2.1-nightly.30 [skip ci] (diff) | |
download | ferdium-app-81c43ecc3d17e0dbf7ad1d949b6d977f2c65bd48.tar.gz ferdium-app-81c43ecc3d17e0dbf7ad1d949b6d977f2c65bd48.tar.zst ferdium-app-81c43ecc3d17e0dbf7ad1d949b6d977f2c65bd48.zip |
fix: 'failed prop' warning in QuickSwitchModal, SettingsNavigation, SettingsWindow and Recipe component tree (#713)
* chore: turn off eslint rule @typescript-eslint/no-useless-constructor to initialize dynamic props & state
Co-authored-by: Muhamed <>
Co-authored-by: Vijay A <vraravam@users.noreply.github.com>
Diffstat (limited to 'src/components/settings/recipes/RecipeItem.js')
-rw-r--r-- | src/components/settings/recipes/RecipeItem.js | 33 |
1 files changed, 0 insertions, 33 deletions
diff --git a/src/components/settings/recipes/RecipeItem.js b/src/components/settings/recipes/RecipeItem.js deleted file mode 100644 index df5b42222..000000000 --- a/src/components/settings/recipes/RecipeItem.js +++ /dev/null | |||
@@ -1,33 +0,0 @@ | |||
1 | import { Component } from 'react'; | ||
2 | import PropTypes from 'prop-types'; | ||
3 | import { observer } from 'mobx-react'; | ||
4 | |||
5 | import RecipePreviewModel from '../../../models/RecipePreview'; | ||
6 | |||
7 | class RecipeItem extends Component { | ||
8 | static propTypes = { | ||
9 | recipe: PropTypes.instanceOf(RecipePreviewModel).isRequired, | ||
10 | onClick: PropTypes.func.isRequired, | ||
11 | }; | ||
12 | |||
13 | render() { | ||
14 | const { recipe, onClick } = this.props; | ||
15 | |||
16 | return ( | ||
17 | <button type="button" className="recipe-teaser" onClick={onClick}> | ||
18 | {recipe.isDevRecipe && ( | ||
19 | <span className="recipe-teaser__dev-badge">dev</span> | ||
20 | )} | ||
21 | <img src={recipe.icons.svg} className="recipe-teaser__icon" alt="" /> | ||
22 | <span className="recipe-teaser__label">{recipe.name}</span> | ||
23 | {recipe.aliases && recipe.aliases.length > 0 && ( | ||
24 | <span className="recipe-teaser__alias_label"> | ||
25 | {`Aliases: ${recipe.aliases.join(', ')}`} | ||
26 | </span> | ||
27 | )} | ||
28 | </button> | ||
29 | ); | ||
30 | } | ||
31 | } | ||
32 | |||
33 | export default observer(RecipeItem); | ||