From ecbcd40c4d95bbf9464c9b698618603f6a67a4ac Mon Sep 17 00:00:00 2001 From: 6ea86b96 <6ea86b96@gmail.com> Date: Tue, 2 May 2017 13:11:43 +0700 Subject: [PATCH] File tile stream fixes --- ui/js/component/fileCardStream/view.jsx | 1 - ui/js/component/fileTileStream/index.js | 2 +- ui/js/component/fileTileStream/view.jsx | 17 +++++++++++------ 3 files changed, 12 insertions(+), 8 deletions(-) diff --git a/ui/js/component/fileCardStream/view.jsx b/ui/js/component/fileCardStream/view.jsx index 257c9268c..72284eb79 100644 --- a/ui/js/component/fileCardStream/view.jsx +++ b/ui/js/component/fileCardStream/view.jsx @@ -61,7 +61,6 @@ class FileCardStream extends React.Component { isResolvingUri, navigate, hidePrice, - claim, } = this.props const uri = lbryuri.normalize(this.props.uri); diff --git a/ui/js/component/fileTileStream/index.js b/ui/js/component/fileTileStream/index.js index faf50f08b..80807f125 100644 --- a/ui/js/component/fileTileStream/index.js +++ b/ui/js/component/fileTileStream/index.js @@ -42,7 +42,7 @@ const makeSelect = () => { obscureNsfw: selectObscureNsfw(state), metadata: selectMetadataForUri(state, props), source: selectSourceForUri(state, props), - resolvingUri: selectResolvingUri(state, props), + isResolvingUri: selectResolvingUri(state, props), }) return select diff --git a/ui/js/component/fileTileStream/view.jsx b/ui/js/component/fileTileStream/view.jsx index 7d2b0b360..6a80772eb 100644 --- a/ui/js/component/fileTileStream/view.jsx +++ b/ui/js/component/fileTileStream/view.jsx @@ -63,7 +63,9 @@ class FileTileStream extends React.Component { const { metadata, + isResolvingUri, navigate, + hidePrice, } = this.props const uri = lbryuri.normalize(this.props.uri); @@ -71,7 +73,14 @@ class FileTileStream extends React.Component { const title = isConfirmed ? metadata.title : uri; const obscureNsfw = this.props.obscureNsfw && isConfirmed && metadata.nsfw; - console.debug(this.props) + let description = "" + if (isConfirmed) { + description = metadata.description + } else if (isResolvingUri) { + description = "Loading..." + } else { + description = This file is pending confirmation + } return ( @@ -103,11 +112,7 @@ class FileTileStream extends React.Component { - - {isConfirmed - ? metadata.description - : This file is pending confirmation.} - + {description}
- - {isConfirmed - ? metadata.description - : This file is pending confirmation.} - + {description}