diff --git a/ui/component/comment/index.js b/ui/component/comment/index.js index 9e4ed5825..26e604e64 100644 --- a/ui/component/comment/index.js +++ b/ui/component/comment/index.js @@ -11,12 +11,13 @@ import { doToast } from 'redux/actions/notifications'; import { doSetPlayingUri } from 'redux/actions/content'; import { selectUserVerifiedEmail } from 'redux/selectors/user'; import { selectLinkedCommentAncestors, makeSelectOthersReactionsForComment } from 'redux/selectors/comments'; -import { selectActiveChannelId, selectActiveChannelClaim } from 'redux/selectors/app'; +import { selectActiveChannelClaim } from 'redux/selectors/app'; import { selectPlayingUri } from 'redux/selectors/content'; import Comment from './view'; const select = (state, props) => { - const activeChannelId = selectActiveChannelId(state); + const activeChannelClaim = selectActiveChannelClaim(state); + const activeChannelId = activeChannelClaim && activeChannelClaim.claim_id; const reactionKey = activeChannelId ? `${props.commentId}:${activeChannelId}` : props.commentId; return { @@ -25,7 +26,7 @@ const select = (state, props) => { channelIsBlocked: props.authorUri && makeSelectChannelIsMuted(props.authorUri)(state), commentingEnabled: IS_WEB ? Boolean(selectUserVerifiedEmail(state)) : true, othersReacts: makeSelectOthersReactionsForComment(reactionKey)(state), - activeChannelClaim: selectActiveChannelClaim(state), + activeChannelClaim, myChannels: selectMyChannelClaims(state), playingUri: selectPlayingUri(state), stakedLevel: makeSelectStakedLevelForChannelUri(props.authorUri)(state), diff --git a/ui/component/commentReactions/index.js b/ui/component/commentReactions/index.js index 585cb7a10..eb72e7362 100644 --- a/ui/component/commentReactions/index.js +++ b/ui/component/commentReactions/index.js @@ -4,10 +4,11 @@ import { makeSelectClaimIsMine, makeSelectClaimForUri } from 'lbry-redux'; import { doToast } from 'redux/actions/notifications'; import { makeSelectMyReactionsForComment, makeSelectOthersReactionsForComment } from 'redux/selectors/comments'; import { doCommentReact } from 'redux/actions/comments'; -import { selectActiveChannelId } from 'redux/selectors/app'; +import { selectActiveChannelClaim } from 'redux/selectors/app'; const select = (state, props) => { - const activeChannelId = selectActiveChannelId(state); + const activeChannelClaim = selectActiveChannelClaim(state); + const activeChannelId = activeChannelClaim && activeChannelClaim.claim_id; const reactionKey = activeChannelId ? `${props.commentId}:${activeChannelId}` : props.commentId; return { diff --git a/ui/component/commentsList/index.js b/ui/component/commentsList/index.js index 72a5b2916..dac16d16d 100644 --- a/ui/component/commentsList/index.js +++ b/ui/component/commentsList/index.js @@ -13,10 +13,11 @@ import { } from 'redux/selectors/comments'; import { doCommentReset, doCommentList, doCommentById, doCommentReactList } from 'redux/actions/comments'; import { selectUserVerifiedEmail } from 'redux/selectors/user'; -import { selectActiveChannelId } from 'redux/selectors/app'; +import { selectActiveChannelClaim } from 'redux/selectors/app'; import CommentsList from './view'; const select = (state, props) => { + const activeChannelClaim = selectActiveChannelClaim(state); return { myChannels: selectMyChannelClaims(state), allCommentIds: makeSelectCommentIdsForUri(props.uri)(state), @@ -31,7 +32,7 @@ const select = (state, props) => { fetchingChannels: selectFetchingMyChannels(state), myReactsByCommentId: selectMyReactionsByCommentId(state), othersReactsById: selectOthersReactsById(state), - activeChannelId: selectActiveChannelId(state), + activeChannelId: activeChannelClaim && activeChannelClaim.claim_id, }; };