2017-12-21 22:08:54 +01:00
|
|
|
import React from 'react';
|
2018-03-26 23:32:43 +02:00
|
|
|
import Button from 'component/button';
|
2017-12-21 22:08:54 +01:00
|
|
|
import FileList from 'component/fileList';
|
2018-03-26 23:32:43 +02:00
|
|
|
import Page from 'component/page';
|
2017-04-23 18:10:45 +02:00
|
|
|
|
2017-06-08 06:42:19 +02:00
|
|
|
class FileListPublished extends React.PureComponent {
|
2018-03-26 23:32:43 +02:00
|
|
|
componentDidMount() {
|
|
|
|
const { pendingPublishes, checkIfPublishesConfirmed } = this.props;
|
|
|
|
if (pendingPublishes.length) {
|
|
|
|
checkIfPublishesConfirmed(pendingPublishes);
|
|
|
|
}
|
2017-05-01 08:26:09 +02:00
|
|
|
}
|
2017-04-23 18:10:45 +02:00
|
|
|
|
2017-05-01 08:26:09 +02:00
|
|
|
render() {
|
2018-03-26 23:32:43 +02:00
|
|
|
const { claims, pendingPublishes, navigate } = this.props;
|
|
|
|
const fileInfos = [...pendingPublishes, ...claims];
|
2017-05-05 10:10:51 +02:00
|
|
|
|
|
|
|
return (
|
2018-03-26 23:32:43 +02:00
|
|
|
<Page notContained>
|
|
|
|
{fileInfos.length ? (
|
|
|
|
<FileList fileInfos={fileInfos} sortByHeight />
|
|
|
|
) : (
|
|
|
|
<div className="page__empty">
|
|
|
|
{__("It looks like you haven't published anything to LBRY yet.")}
|
|
|
|
<div className="card__actions card__actions--center">
|
|
|
|
<Button
|
|
|
|
button="primary"
|
|
|
|
onClick={() => navigate('/publish')}
|
|
|
|
label={__('Publish something new')}
|
|
|
|
/>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
)}
|
|
|
|
</Page>
|
2017-06-06 23:19:12 +02:00
|
|
|
);
|
2017-05-01 08:26:09 +02:00
|
|
|
}
|
|
|
|
}
|
2017-04-23 18:10:45 +02:00
|
|
|
|
2017-06-06 06:21:55 +02:00
|
|
|
export default FileListPublished;
|