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

40 lines
829 B
React
Raw 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 (
2018-09-26 19:48:07 +02:00
<Modal
isOpen
title={__('Unable to Download')}
contentLabel={__('Download failed')}
onConfirmed={closeModal}
>
<section className="card__content">
<p className="error-modal__error-list">
2018-09-26 19:48:07 +02:00
{__('LBRY was unable to download the stream')}:
<div>
2019-04-24 16:02:08 +02:00
<b>{title ? `"${title}"` : uri}</b>
</div>
2018-09-26 19:48:07 +02:00
</p>
</section>
2017-09-07 23:18:33 +02:00
</Modal>
);
}
}
export default ModalFileTimeout;