2021-09-30 23:30:32 +02:00
|
|
|
import { connect } from 'react-redux';
|
2021-11-16 05:43:28 +01:00
|
|
|
import { selectIsUriResolving } from 'redux/selectors/claims';
|
2021-10-17 10:36:14 +02:00
|
|
|
import { doResolveUri } from 'redux/actions/claims';
|
2021-09-30 23:30:32 +02:00
|
|
|
import { makeSelectWinningUriForQuery } from 'redux/selectors/search';
|
|
|
|
import ChannelMentionTopSuggestion from './view';
|
|
|
|
|
|
|
|
const select = (state, props) => {
|
|
|
|
const uriFromQuery = `lbry://${props.query}`;
|
|
|
|
return {
|
|
|
|
uriFromQuery,
|
2021-11-16 05:43:28 +01:00
|
|
|
isResolvingUri: selectIsUriResolving(state, uriFromQuery),
|
2021-09-30 23:30:32 +02:00
|
|
|
winningUri: makeSelectWinningUriForQuery(props.query)(state),
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
export default connect(select, { doResolveUri })(ChannelMentionTopSuggestion);
|