diff --git a/src/renderer/component/recommendedContent/index.js b/src/renderer/component/recommendedContent/index.js index 166498b6d..36ae3337e 100644 --- a/src/renderer/component/recommendedContent/index.js +++ b/src/renderer/component/recommendedContent/index.js @@ -1,10 +1,16 @@ import { connect } from 'react-redux'; -import { makeSelectClaimForUri, doSearch, makeSelectRecommendedContentForUri } from 'lbry-redux'; +import { + makeSelectClaimForUri, + doSearch, + makeSelectRecommendedContentForUri, + selectIsSearching, +} from 'lbry-redux'; import RecommendedVideos from './view'; const select = (state, props) => ({ claim: makeSelectClaimForUri(props.uri)(state), recommendedContent: makeSelectRecommendedContentForUri(props.uri)(state), + isSearching: selectIsSearching(state), }); const perform = dispatch => ({ diff --git a/src/renderer/component/recommendedContent/view.jsx b/src/renderer/component/recommendedContent/view.jsx index 5248d3859..4a12aecb3 100644 --- a/src/renderer/component/recommendedContent/view.jsx +++ b/src/renderer/component/recommendedContent/view.jsx @@ -7,6 +7,7 @@ type Props = { uri: string, claim: ?Claim, recommendedContent: Array, + isSearching: boolean, search: string => void, }; @@ -46,13 +47,12 @@ export default class RecommendedContent extends React.PureComponent { didSearch: ?boolean; render() { - const { recommendedContent } = this.props; + const { recommendedContent, isSearching } = this.props; return (
Related {recommendedContent && - recommendedContent.length && recommendedContent.map(recommendedUri => ( { uri={recommendedUri} /> ))} + {recommendedContent && + !recommendedContent.length && + !isSearching &&
No related content found
}
); } diff --git a/src/renderer/page/file/view.jsx b/src/renderer/page/file/view.jsx index 6cd38b050..da35a01d1 100644 --- a/src/renderer/page/file/view.jsx +++ b/src/renderer/page/file/view.jsx @@ -160,13 +160,6 @@ class FilePage extends React.Component { editUri = buildURI(uriObject); } - let recommendedUri = uri; - if (!recommendedUri.includes('#')) { - // at a vanity url - // append the claim ID so we can properly strip it out of reccomended videos - recommendedUri = `${recommendedUri}#${claim.claim_id}`; - } - return (
@@ -251,7 +244,7 @@ class FilePage extends React.Component {
- +
); }