PromucFlow_constructor/app/client/src/comments/AppComments/AppComments.tsx
2021-06-09 16:05:10 +05:30

22 lines
592 B
TypeScript

import React from "react";
import { useSelector } from "react-redux";
import { commentModeSelector } from "selectors/commentsSelectors";
import AppCommentsHeader from "./AppCommentsHeader";
import AppCommentThreads from "./AppCommentThreads";
import Container from "./Container";
function AppComments(props: { isInline?: boolean }) {
const isCommentMode = useSelector(commentModeSelector);
if (!isCommentMode) return null;
return (
<Container isInline={props.isInline}>
<AppCommentsHeader />
<AppCommentThreads />
</Container>
);
}
export default AppComments;