201a826381
- Memo not required. `resolvingUris` is very dynamic and is a short array anyways. - Changeg from using `indexOf` to `includes`, which is more concise.
16 lines
606 B
JavaScript
16 lines
606 B
JavaScript
import { connect } from 'react-redux';
|
|
import { selectIsUriResolving } from 'redux/selectors/claims';
|
|
import { doResolveUri } from 'redux/actions/claims';
|
|
import { makeSelectWinningUriForQuery } from 'redux/selectors/search';
|
|
import ChannelMentionTopSuggestion from './view';
|
|
|
|
const select = (state, props) => {
|
|
const uriFromQuery = `lbry://${props.query}`;
|
|
return {
|
|
uriFromQuery,
|
|
isResolvingUri: selectIsUriResolving(state, uriFromQuery),
|
|
winningUri: makeSelectWinningUriForQuery(props.query)(state),
|
|
};
|
|
};
|
|
|
|
export default connect(select, { doResolveUri })(ChannelMentionTopSuggestion);
|