lbry-desktop/ui/component/channelDiscussion/view.jsx

26 lines
631 B
React
Raw Normal View History

// @flow
import React from 'react';
import CommentsList from 'component/commentsList';
2021-02-04 06:45:49 +01:00
import Empty from 'component/common/empty';
type Props = {
uri: string,
linkedCommentId?: string,
2021-02-05 00:00:07 +01:00
commentsDisabled: boolean,
};
function ChannelDiscussion(props: Props) {
const { uri, linkedCommentId, commentsDisabled } = props;
2021-02-05 00:00:07 +01:00
if (commentsDisabled) {
return <Empty text={__('This channel has disabled comments on their page.')} />;
2021-02-04 06:45:49 +01:00
}
return (
<section className="section">
<CommentsList uri={uri} linkedCommentId={linkedCommentId} commentsAreExpanded />
</section>
);
}
export default ChannelDiscussion;