2021-09-30 23:30:32 +02:00
|
|
|
import { connect } from 'react-redux';
|
2022-01-20 02:46:01 +01:00
|
|
|
import { selectIsUriResolving } from 'redux/selectors/claims';
|
2021-10-08 05:47:39 +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,
|
2022-01-20 02:46:01 +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);
|