lbry-desktop/ui/modal/modalFileTimeout/view.jsx

33 lines
715 B
React
Raw Permalink Normal View History

2018-09-26 19:48:07 +02:00
// @flow
import React from 'react';
import { Modal } from 'modal/modal';
2017-09-07 23:18:33 +02:00
2018-09-26 19:48:07 +02:00
type Props = {
2019-04-24 16:02:08 +02:00
uri: string,
metadata: StreamMetadata,
2018-09-26 19:48:07 +02:00
closeModal: () => void,
};
class ModalFileTimeout extends React.PureComponent<Props> {
2017-09-07 23:18:33 +02:00
render() {
2018-05-03 19:22:10 +02:00
const {
2019-04-24 16:02:08 +02:00
uri,
2018-05-03 19:22:10 +02:00
metadata: { title },
2018-09-26 19:48:07 +02:00
closeModal,
2018-05-03 19:22:10 +02:00
} = this.props;
2017-09-07 23:18:33 +02:00
return (
2020-08-26 22:28:33 +02:00
<Modal isOpen title={__('Unable to download')} contentLabel={__('Download failed')} onConfirmed={closeModal}>
2019-07-21 23:31:22 +02:00
<p className="error-modal__error-list">
{__('LBRY was unable to download the stream')}:
<div>
<b>{title ? `"${title}"` : uri}</b>
</div>
</p>
2017-09-07 23:18:33 +02:00
</Modal>
);
}
}
export default ModalFileTimeout;