diff --git a/config.js b/config.js index 09c7f23c6..cbbcfeb89 100644 --- a/config.js +++ b/config.js @@ -29,13 +29,13 @@ const config = { DEFAULT_LANGUAGE: process.env.DEFAULT_LANGUAGE, AUTO_FOLLOW_CHANNELS: process.env.AUTO_FOLLOW_CHANNELS, UNSYNCED_SETTINGS: process.env.UNSYNCED_SETTINGS, + ENABLE_COMMENT_REACTIONS: process.env.ENABLE_COMMENT_REACTIONS === 'true', SIMPLE_SITE: process.env.SIMPLE_SITE === 'true', SHOW_ADS: process.env.SHOW_ADS === 'true', PINNED_URI_1: process.env.PINNED_URI_1, PINNED_LABEL_1: process.env.PINNED_LABEL_1, PINNED_URI_2: process.env.PINNED_URI_2, PINNED_LABEL_2: process.env.PINNED_LABEL_2, - ENABLE_COMMENT_REACTIONS: process.env.ENABLE_COMMENT_REACTIONS === 'true', }; config.URL_LOCAL = `http://localhost:${config.WEB_SERVER_PORT}`; diff --git a/flow-typed/Comment.js b/flow-typed/Comment.js index 4a3db6a8d..f5087c5d9 100644 --- a/flow-typed/Comment.js +++ b/flow-typed/Comment.js @@ -25,7 +25,7 @@ declare type CommentsState = { isFetchingReacts: boolean, myReactsByCommentId: any, othersReactsByCommentId: any, - typesReacting: Array, + pendingCommentReactions: Array, }; declare type CommentReactParams = { diff --git a/static/app-strings.json b/static/app-strings.json index e6245761c..bc4d148e1 100644 --- a/static/app-strings.json +++ b/static/app-strings.json @@ -1303,5 +1303,9 @@ "Create a channel": "Create a channel", "Credit Details": "Credit Details", "LBRY Credits": "LBRY Credits", + "Sign In": "Sign In", + "Change to tile layout": "Change to tile layout", + "%total_comments% comments": "%total_comments% comments", + "Sync my YouTube channel": "Sync my YouTube channel", "--end--": "--end--" } diff --git a/ui/component/comment/view.jsx b/ui/component/comment/view.jsx index 549750777..917623975 100644 --- a/ui/component/comment/view.jsx +++ b/ui/component/comment/view.jsx @@ -2,7 +2,7 @@ import * as ICONS from 'constants/icons'; import * as PAGES from 'constants/pages'; import { FF_MAX_CHARS_IN_COMMENT } from 'constants/form-field'; -import { SITE_NAME, SIMPLE_SITE } from 'config'; +import { SITE_NAME, SIMPLE_SITE, ENABLE_COMMENT_REACTIONS } from 'config'; import React, { useEffect, useState } from 'react'; import { isEmpty } from 'util/object'; import DateTime from 'component/dateTime'; @@ -255,7 +255,7 @@ function Comment(props: Props) { icon={ICONS.REPLY} /> )} - + {ENABLE_COMMENT_REACTIONS && } )} diff --git a/ui/component/commentReactions/index.js b/ui/component/commentReactions/index.js index 02a845761..995d0216f 100644 --- a/ui/component/commentReactions/index.js +++ b/ui/component/commentReactions/index.js @@ -3,14 +3,14 @@ import Comment from './view'; import { makeSelectMyReactionsForComment, makeSelectOthersReactionsForComment, - selectTypesReacting, + selectPendingCommentReacts, } from 'redux/selectors/comments'; import { doCommentReact } from 'redux/actions/comments'; const select = (state, props) => ({ myReacts: makeSelectMyReactionsForComment(props.commentId)(state), othersReacts: makeSelectOthersReactionsForComment(props.commentId)(state), - typesReacting: selectTypesReacting(state), + pendingCommentReacts: selectPendingCommentReacts(state), }); const perform = dispatch => ({ diff --git a/ui/component/commentReactions/view.jsx b/ui/component/commentReactions/view.jsx index a921e3cb0..065fd6da2 100644 --- a/ui/component/commentReactions/view.jsx +++ b/ui/component/commentReactions/view.jsx @@ -12,10 +12,11 @@ type Props = { othersReacts: any, react: (string, string) => void, commentId: string, + pendingCommentReacts: Array, }; export default function CommentReactions(props: Props) { - const { myReacts, othersReacts, commentId, react } = props; + const { myReacts, othersReacts, commentId, react, pendingCommentReacts } = props; const [activeChannel] = usePersistedState('comment-channel'); const getCountForReact = type => { @@ -29,29 +30,29 @@ export default function CommentReactions(props: Props) { return count; }; - if (!ENABLE_COMMENT_REACTIONS) { - return null; - } + // return null; return ( <>