From 49bd58bd19ed298099a2e46e4172ca3bcca88ffd Mon Sep 17 00:00:00 2001 From: Alexey Kasyanchuk Date: Tue, 16 May 2017 23:12:19 +0300 Subject: [PATCH] =?UTF-8?q?=D1=82=D0=BE=D1=80=D1=80=D0=B5=D0=BD=D1=82?= =?UTF-8?q?=D1=8B=20=D0=B1=D0=B5=D0=B7=20=D1=84=D0=B0=D0=B9=D0=BB=D0=BE?= =?UTF-8?q?=D0=B2=20=D0=BE=D1=82=D0=BE=D0=B1=D1=80=D0=B0=D0=B6=D0=B0=D1=8E?= =?UTF-8?q?=D1=82=D1=81=D1=8F=20=D0=BA=D0=B0=D0=BA=20=D0=BF=D1=80=D0=BE?= =?UTF-8?q?=D1=86=D0=B5=D1=81=D0=B8=D0=BD=D0=B3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/torrent-page.js | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/src/torrent-page.js b/src/torrent-page.js index 71e99d4..5796c96 100644 --- a/src/torrent-page.js +++ b/src/torrent-page.js @@ -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 ( - Content of the torrent: - {treeToTorrentFiles(tree)} + { + filesList.length > 0 + ? +
+ Content of the torrent: + {treeToTorrentFiles(tree)} +
+ : +
+ Processing files... + +
+ }
); };