6d217dbc50
* Exclude default homepage data at compile time The youtuber IDs alone is pretty huge, and is unused in the `CUSTOM_HOMEPAGE=true` configuration. * Remove Desktop items and other cleanup - Moved constants out of the component. - Remove SIMPLE_SITE check. - Remove Desktop-only items * Sidebar: limit subscription and tag section ## Issue Too slow for huge lists ## Change Limit to 10 initially, and load everything on "Show more" * Fix makeSelectThumbnailForUri - Fix memo - Expose function to extract directly from claim if client already have it.
33 lines
1,013 B
JavaScript
33 lines
1,013 B
JavaScript
import { connect } from 'react-redux';
|
|
import {
|
|
selectClaimIsMine,
|
|
makeSelectTitleForUri,
|
|
getThumbnailFromClaim,
|
|
selectClaimForUri,
|
|
makeSelectIsUriResolving,
|
|
makeSelectMetadataItemForUri,
|
|
} from 'redux/selectors/claims';
|
|
import { doResolveUri } from 'redux/actions/claims';
|
|
import { selectBlackListedOutpoints } from 'lbryinc';
|
|
import PreviewLink from './view';
|
|
|
|
const select = (state, props) => {
|
|
const claim = selectClaimForUri(state, props.uri);
|
|
|
|
return {
|
|
uri: props.uri,
|
|
claim,
|
|
title: makeSelectTitleForUri(props.uri)(state),
|
|
thumbnail: getThumbnailFromClaim(claim),
|
|
description: makeSelectMetadataItemForUri(props.uri, 'description')(state),
|
|
channelIsMine: selectClaimIsMine(state, claim),
|
|
isResolvingUri: makeSelectIsUriResolving(props.uri)(state),
|
|
blackListedOutpoints: selectBlackListedOutpoints(state),
|
|
};
|
|
};
|
|
|
|
const perform = (dispatch) => ({
|
|
resolveUri: (uri) => dispatch(doResolveUri(uri)),
|
|
});
|
|
|
|
export default connect(select, perform)(PreviewLink);
|