import React, { Component } from 'react'; import PropTypes from 'prop-types'; import { defineMessages, injectIntl } from 'react-intl'; import InfoBar from './ui/InfoBar'; import { GITHUB_FERDI_URL } from '../config'; import { openExternalUrl } from '../helpers/url-helpers'; const messages = defineMessages({ updateAvailable: { id: 'infobar.updateAvailable', defaultMessage: 'A new update for Ferdi is available.', }, changelog: { id: 'infobar.buttonChangelog', defaultMessage: 'What is new?', }, buttonInstallUpdate: { id: 'infobar.buttonInstallUpdate', defaultMessage: 'Restart & install update', }, }); class AppUpdateInfoBar extends Component { static propTypes = { onInstallUpdate: PropTypes.func.isRequired, onHide: PropTypes.func.isRequired, }; render() { const { intl } = this.props; const { onInstallUpdate, onHide } = this.props; return ( {intl.formatMessage(messages.updateAvailable)}{' '} ); } } export default injectIntl(AppUpdateInfoBar);