Skip to content
Snippets Groups Projects
Commit 0b8c99ab authored by chris's avatar chris
Browse files

more comment files

parent b9c6db0d
No related branches found
No related tags found
1 merge request!72Comments
import React, { useEffect, useRef, useContext } from "react";
export default ({ node, view }) => {
useEffect(() => {}, []);
};
......@@ -8,14 +8,7 @@ import React, {
import styled from "styled-components";
import { WaxContext } from "wax-prosemirror-core/src/ioc-react";
import { DocumentHelpers } from "wax-prosemirror-utilities";
const CommentComponentStyled = styled.div`
width: 100px;
height: 100px;
background: black;
display: flex;
flex-direction: row;
`;
import CommentsBoxList from "./CommentsBoxList";
export default () => {
const { view: { main } } = useContext(WaxContext);
......@@ -29,7 +22,7 @@ export default () => {
);
const CommentComponent = useMemo(
() => <CommentComponentStyled view={main} />,
() => <CommentsBoxList comments={comments} view={main} />,
[comments]
);
return <Fragment>{CommentComponent}</Fragment>;
......
import React, { Fragment } from "react";
import CommentBox from "./CommentBox";
export default ({ comments, view }) => {
return (
<Fragment>
{comments.map(comment => (
<CommentBox key="" node={comment.node} view={view} />
))}
</Fragment>
);
};
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment