diff --git a/apps/comments-ui/src/components/CommentsBox.js b/apps/comments-ui/src/components/CommentsBox.js index 5c718b8a03..c32719760e 100644 --- a/apps/comments-ui/src/components/CommentsBox.js +++ b/apps/comments-ui/src/components/CommentsBox.js @@ -9,6 +9,42 @@ import NotPaidBox from './NotPaidBox'; import Loading from './Loading'; import {ROOT_DIV_ID} from '../utils/constants'; +const CommentsBoxTitle = ({title, showCount, count}) => { + // We have to check for null for title because null means default, wheras empty string means empty + if (!title && !showCount && title !== null) { + return null; + } + + const Title = ({title}) => { + if (title === null) { + return ( + <>Member discussion> + ); + } + + return title; + }; + + const Count = ({showCount, count}) => { + if (!showCount) { + return null; + } + + return ( +