Fix stakedLevel looking looking for wrong prop

This commit is contained in:
Rafael 2021-12-31 08:45:16 -03:00 committed by infinite-persistence
parent 5d1e6a8f7c
commit e94f66a5fe

View file

@ -2,10 +2,15 @@ import { connect } from 'react-redux';
import { selectStakedLevelForChannelUri, selectClaimForUri, selectMyClaimIdsRaw } from 'redux/selectors/claims';
import LivestreamComment from './view';
const select = (state, props) => ({
claim: selectClaimForUri(state, props.uri),
stakedLevel: selectStakedLevelForChannelUri(state, props.authorUri),
const select = (state, props) => {
const { uri, comment } = props;
const { channel_url: authorUri } = comment;
return {
claim: selectClaimForUri(state, uri),
stakedLevel: selectStakedLevelForChannelUri(state, authorUri),
myChannelIds: selectMyClaimIdsRaw(state),
});
};
};
export default connect(select)(LivestreamComment);