2018-03-26 23:32:43 +02:00
|
|
|
// @flow
|
|
|
|
import React from 'react';
|
|
|
|
import { Modal } from 'modal/modal';
|
|
|
|
|
|
|
|
type Props = {
|
|
|
|
closeModal: () => void,
|
|
|
|
clearPublish: () => void,
|
|
|
|
navigate: string => void,
|
|
|
|
uri: string,
|
|
|
|
};
|
|
|
|
|
2019-04-10 23:27:12 +02:00
|
|
|
class ModalPublishSuccess extends React.PureComponent<Props> {
|
2018-03-26 23:32:43 +02:00
|
|
|
render() {
|
|
|
|
const { closeModal, clearPublish, navigate, uri } = this.props;
|
|
|
|
|
|
|
|
return (
|
|
|
|
<Modal
|
|
|
|
isOpen
|
2018-09-26 19:48:07 +02:00
|
|
|
title={__('Success')}
|
2018-03-26 23:32:43 +02:00
|
|
|
contentLabel={__('File published')}
|
|
|
|
onConfirmed={() => {
|
|
|
|
clearPublish();
|
2019-04-10 23:27:12 +02:00
|
|
|
navigate('/$/published');
|
2018-03-26 23:32:43 +02:00
|
|
|
closeModal();
|
|
|
|
}}
|
|
|
|
>
|
2018-09-26 19:48:07 +02:00
|
|
|
<section className="card__content">
|
|
|
|
<p>{__('Your file has been published to LBRY at the address')}</p>
|
2019-01-08 20:40:24 +01:00
|
|
|
<blockquote>{uri}</blockquote>
|
2018-09-26 19:48:07 +02:00
|
|
|
<p>
|
|
|
|
{__(
|
|
|
|
'The file will take a few minutes to appear for other LBRY users. Until then it will be listed as "pending" under your published files.'
|
|
|
|
)}
|
|
|
|
</p>
|
|
|
|
</section>
|
2018-03-26 23:32:43 +02:00
|
|
|
</Modal>
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2019-04-10 23:27:12 +02:00
|
|
|
export default ModalPublishSuccess;
|