import React from 'react' import PropTypes from 'prop-types' import { defineMessages, FormattedMessage, injectIntl } from 'react-intl' import { source_url, version, } from '../initial_state' import { APP_NAME, DEFAULT_REL, } from '../constants' import Button from './button' import Divider from './divider' import Icon from './icon' import Text from './text' class BundleColumnError extends React.PureComponent { handleRetry = () => { this.props.onRetry() } render () { const { intl: { formatMessage } } = this.props return (

{formatMessage(messages.body)}
{APP_NAME} ({version})
) } } const messages = defineMessages({ title: { id: 'bundle_column_error.title', defaultMessage: 'Network error' }, body: { id: 'bundle_column_error.body', defaultMessage: 'Something went wrong while loading this component.' }, retry: { id: 'bundle_column_error.retry', defaultMessage: 'Try again' }, }) BundleColumnError.propTypes = { onRetry: PropTypes.func.isRequired, intl: PropTypes.object.isRequired, } export default injectIntl(BundleColumnError)