aboutsummaryrefslogtreecommitdiffstats
path: root/src/components/AppUpdateInfoBar.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/components/AppUpdateInfoBar.js')
-rw-r--r--src/components/AppUpdateInfoBar.js16
1 files changed, 6 insertions, 10 deletions
diff --git a/src/components/AppUpdateInfoBar.js b/src/components/AppUpdateInfoBar.js
index 30804262a..9dc86bd1d 100644
--- a/src/components/AppUpdateInfoBar.js
+++ b/src/components/AppUpdateInfoBar.js
@@ -1,6 +1,6 @@
1import React, { Component } from 'react'; 1import React, { Component } from 'react';
2import PropTypes from 'prop-types'; 2import PropTypes from 'prop-types';
3import { defineMessages, intlShape } from 'react-intl'; 3import { defineMessages, injectIntl } from 'react-intl';
4 4
5import InfoBar from './ui/InfoBar'; 5import InfoBar from './ui/InfoBar';
6import { GITHUB_FERDI_URL } from '../config'; 6import { GITHUB_FERDI_URL } from '../config';
@@ -9,15 +9,15 @@ import { openExternalUrl } from '../helpers/url-helpers';
9const messages = defineMessages({ 9const messages = defineMessages({
10 updateAvailable: { 10 updateAvailable: {
11 id: 'infobar.updateAvailable', 11 id: 'infobar.updateAvailable',
12 defaultMessage: '!!!A new update for Ferdi is available.', 12 defaultMessage: 'A new update for Ferdi is available.',
13 }, 13 },
14 changelog: { 14 changelog: {
15 id: 'infobar.buttonChangelog', 15 id: 'infobar.buttonChangelog',
16 defaultMessage: '!!!Changelog', 16 defaultMessage: 'Changelog',
17 }, 17 },
18 buttonInstallUpdate: { 18 buttonInstallUpdate: {
19 id: 'infobar.buttonInstallUpdate', 19 id: 'infobar.buttonInstallUpdate',
20 defaultMessage: '!!!Restart & install update', 20 defaultMessage: 'Restart & install update',
21 }, 21 },
22}); 22});
23 23
@@ -27,12 +27,8 @@ class AppUpdateInfoBar extends Component {
27 onHide: PropTypes.func.isRequired, 27 onHide: PropTypes.func.isRequired,
28 }; 28 };
29 29
30 static contextTypes = {
31 intl: intlShape,
32 };
33
34 render() { 30 render() {
35 const { intl } = this.context; 31 const { intl } = this.props;
36 const { onInstallUpdate, onHide } = this.props; 32 const { onInstallUpdate, onHide } = this.props;
37 33
38 return ( 34 return (
@@ -61,4 +57,4 @@ class AppUpdateInfoBar extends Component {
61 } 57 }
62} 58}
63 59
64export default AppUpdateInfoBar; 60export default injectIntl(AppUpdateInfoBar);