diff options
author | 2021-07-02 19:49:55 -0600 | |
---|---|---|
committer | 2021-07-03 07:19:55 +0530 | |
commit | 33123c354b79f7951423dd75097b11e7eb075f99 (patch) | |
tree | 29f6e857f02d0e0fc67d89a657a54a865ed5538a /src/components/ui/Tabs | |
parent | Minor refactoring to move all runtime configs from 'config.js' into 'environm... (diff) | |
download | ferdium-app-33123c354b79f7951423dd75097b11e7eb075f99.tar.gz ferdium-app-33123c354b79f7951423dd75097b11e7eb075f99.tar.zst ferdium-app-33123c354b79f7951423dd75097b11e7eb075f99.zip |
Upgrade various dependencies to latest part 2 (#1557)
* Upgrade various dependencies to latest, remove unnecessary electron-hunspell
- upgrade eslint and friends to latest
- remove deprecated 'node-sass' in favor of 'sass'
- disable new rules from 'eslint-config-airbnb' that are conflicting with current code style
- add workspace config for 'vscode' that silences 'experimentalDecorator' warning and forces 'prettier' to single quote
* Run yarn lint to autofix with new ruleset and worked down lint issues to zero
Diffstat (limited to 'src/components/ui/Tabs')
-rw-r--r-- | src/components/ui/Tabs/TabItem.js | 2 | ||||
-rw-r--r-- | src/components/ui/Tabs/Tabs.js | 8 |
2 files changed, 6 insertions, 4 deletions
diff --git a/src/components/ui/Tabs/TabItem.js b/src/components/ui/Tabs/TabItem.js index 16881a7f7..546b05a4e 100644 --- a/src/components/ui/Tabs/TabItem.js +++ b/src/components/ui/Tabs/TabItem.js | |||
@@ -11,7 +11,7 @@ export default class TabItem extends Component { | |||
11 | const { children } = this.props; | 11 | const { children } = this.props; |
12 | 12 | ||
13 | return ( | 13 | return ( |
14 | <Fragment>{children}</Fragment> | 14 | <>{children}</> |
15 | ); | 15 | ); |
16 | } | 16 | } |
17 | } | 17 | } |
diff --git a/src/components/ui/Tabs/Tabs.js b/src/components/ui/Tabs/Tabs.js index 196cddc66..7ece29fbe 100644 --- a/src/components/ui/Tabs/Tabs.js +++ b/src/components/ui/Tabs/Tabs.js | |||
@@ -5,7 +5,9 @@ import classnames from 'classnames'; | |||
5 | 5 | ||
6 | import { oneOrManyChildElements } from '../../../prop-types'; | 6 | import { oneOrManyChildElements } from '../../../prop-types'; |
7 | 7 | ||
8 | export default @observer class Tab extends Component { | 8 | export default |
9 | @observer | ||
10 | class Tab extends Component { | ||
9 | static propTypes = { | 11 | static propTypes = { |
10 | children: oneOrManyChildElements.isRequired, | 12 | children: oneOrManyChildElements.isRequired, |
11 | active: PropTypes.number, | 13 | active: PropTypes.number, |
@@ -15,7 +17,7 @@ export default @observer class Tab extends Component { | |||
15 | active: 0, | 17 | active: 0, |
16 | }; | 18 | }; |
17 | 19 | ||
18 | componentWillMount() { | 20 | componentDidMount() { |
19 | this.setState({ active: this.props.active }); | 21 | this.setState({ active: this.props.active }); |
20 | } | 22 | } |
21 | 23 | ||
@@ -25,7 +27,7 @@ export default @observer class Tab extends Component { | |||
25 | 27 | ||
26 | render() { | 28 | render() { |
27 | const { children: childElements } = this.props; | 29 | const { children: childElements } = this.props; |
28 | const children = childElements.filter(c => !!c); | 30 | const children = childElements.filter((c) => !!c); |
29 | 31 | ||
30 | if (children.length === 1) { | 32 | if (children.length === 1) { |
31 | return <div>{children}</div>; | 33 | return <div>{children}</div>; |