lbry-desktop/ui/component/textareaSuggestionsItem/index.js
Thomas Zarebczan cfea97dd96
Claim title fixes
Also fixed bug on mentions
2022-02-26 13:48:22 -05:00

18 lines
549 B
JavaScript

import { connect } from 'react-redux';
import { selectClaimForUri } from 'redux/selectors/claims';
import TextareaSuggestionsItem from './view';
import { formatLbryChannelName } from 'util/url';
import { getClaimTitle } from 'util/claim';
const select = (state, props) => {
const { uri } = props;
const claim = uri && selectClaimForUri(state, uri);
return {
claimLabel: claim && formatLbryChannelName(claim.canonical_url),
claimTitle: claim && getClaimTitle(claim),
};
};
export default connect(select)(TextareaSuggestionsItem);