торренты без файлов отображаются как процесинг

This commit is contained in:
Alexey Kasyanchuk
2017-05-16 23:12:19 +03:00
parent b3ec5c7bc3
commit 49bd58bd19

View File

@ -64,11 +64,23 @@ const treeToTorrentFiles = (tree) => {
}
const TorrentFiles = (props) => {
let tree = buildFilesTree(props.torrent.filesList);
let filesList = props.torrent.filesList;
let tree = buildFilesTree(filesList);
return (
<List className='w100p'>
<Subheader inset={true}>Content of the torrent:</Subheader>
{treeToTorrentFiles(tree)}
{
filesList.length > 0
?
<div className='w100p'>
<Subheader inset={true}>Content of the torrent:</Subheader>
{treeToTorrentFiles(tree)}
</div>
:
<div className='column center'>
<span className='pad0-75'>Processing files...</span>
<LinearProgress mode="indeterminate" />
</div>
}
</List>
);
};