aboutsummaryrefslogtreecommitdiffstats
path: root/src/components/settings/SettingsLayout.js
diff options
context:
space:
mode:
authorLibravatar Markus Hatvan <markus_hatvan@aon.at>2021-09-13 14:45:46 +0200
committerLibravatar GitHub <noreply@github.com>2021-09-13 14:45:46 +0200
commit537697a6e9757f118d09d9e76362ba1ff617e2c6 (patch)
treebc55447115e385137684e84697a8c15d2199b8d5 /src/components/settings/SettingsLayout.js
parentBumped up version to: 5.6.3-nightly.0 [skip ci] (diff)
downloadferdium-app-537697a6e9757f118d09d9e76362ba1ff617e2c6.tar.gz
ferdium-app-537697a6e9757f118d09d9e76362ba1ff617e2c6.tar.zst
ferdium-app-537697a6e9757f118d09d9e76362ba1ff617e2c6.zip
chore: upgrade intl dependencies (#1920)
Diffstat (limited to 'src/components/settings/SettingsLayout.js')
-rw-r--r--src/components/settings/SettingsLayout.js13
1 files changed, 5 insertions, 8 deletions
diff --git a/src/components/settings/SettingsLayout.js b/src/components/settings/SettingsLayout.js
index 5b3b754fa..0574b3765 100644
--- a/src/components/settings/SettingsLayout.js
+++ b/src/components/settings/SettingsLayout.js
@@ -1,7 +1,7 @@
1import React, { Component } from 'react'; 1import React, { Component } from 'react';
2import PropTypes from 'prop-types'; 2import PropTypes from 'prop-types';
3import { observer } from 'mobx-react'; 3import { observer } from 'mobx-react';
4import { defineMessages, intlShape } from 'react-intl'; 4import { defineMessages, injectIntl } from 'react-intl';
5 5
6import ErrorBoundary from '../util/ErrorBoundary'; 6import ErrorBoundary from '../util/ErrorBoundary';
7import { oneOrManyChildElements } from '../../prop-types'; 7import { oneOrManyChildElements } from '../../prop-types';
@@ -10,11 +10,10 @@ import Appear from '../ui/effects/Appear';
10const messages = defineMessages({ 10const messages = defineMessages({
11 closeSettings: { 11 closeSettings: {
12 id: 'settings.app.closeSettings', 12 id: 'settings.app.closeSettings',
13 defaultMessage: '!!!Close settings', 13 defaultMessage: 'Close settings',
14 }, 14 },
15}); 15});
16 16
17export default
18@observer 17@observer
19class SettingsLayout extends Component { 18class SettingsLayout extends Component {
20 static propTypes = { 19 static propTypes = {
@@ -23,10 +22,6 @@ class SettingsLayout extends Component {
23 closeSettings: PropTypes.func.isRequired, 22 closeSettings: PropTypes.func.isRequired,
24 }; 23 };
25 24
26 static contextTypes = {
27 intl: intlShape,
28 };
29
30 componentDidMount() { 25 componentDidMount() {
31 document.addEventListener('keydown', this.handleKeyDown.bind(this), false); 26 document.addEventListener('keydown', this.handleKeyDown.bind(this), false);
32 } 27 }
@@ -49,7 +44,7 @@ class SettingsLayout extends Component {
49 render() { 44 render() {
50 const { navigation, children, closeSettings } = this.props; 45 const { navigation, children, closeSettings } = this.props;
51 46
52 const { intl } = this.context; 47 const { intl } = this.props;
53 48
54 return ( 49 return (
55 <Appear transitionName="fadeIn-fast"> 50 <Appear transitionName="fadeIn-fast">
@@ -77,3 +72,5 @@ class SettingsLayout extends Component {
77 ); 72 );
78 } 73 }
79} 74}
75
76export default injectIntl(SettingsLayout);