From 0b8c99ab0c51a8496f9156ec86ce313ab671f540 Mon Sep 17 00:00:00 2001
From: chris <kokosias@yahoo.gr>
Date: Thu, 26 Mar 2020 00:57:07 +0200
Subject: [PATCH] more comment files

---
 .../src/components/comments/CommentBox.js            |  5 +++++
 .../src/components/comments/CommentComponent.js      | 11 ++---------
 .../src/components/comments/CommentsBoxList.js       | 12 ++++++++++++
 3 files changed, 19 insertions(+), 9 deletions(-)
 create mode 100644 wax-prosemirror-components/src/components/comments/CommentBox.js
 create mode 100644 wax-prosemirror-components/src/components/comments/CommentsBoxList.js

diff --git a/wax-prosemirror-components/src/components/comments/CommentBox.js b/wax-prosemirror-components/src/components/comments/CommentBox.js
new file mode 100644
index 000000000..1a9d277b7
--- /dev/null
+++ b/wax-prosemirror-components/src/components/comments/CommentBox.js
@@ -0,0 +1,5 @@
+import React, { useEffect, useRef, useContext } from "react";
+
+export default ({ node, view }) => {
+  useEffect(() => {}, []);
+};
diff --git a/wax-prosemirror-components/src/components/comments/CommentComponent.js b/wax-prosemirror-components/src/components/comments/CommentComponent.js
index 040586cee..84fb9e2ae 100644
--- a/wax-prosemirror-components/src/components/comments/CommentComponent.js
+++ b/wax-prosemirror-components/src/components/comments/CommentComponent.js
@@ -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>;
diff --git a/wax-prosemirror-components/src/components/comments/CommentsBoxList.js b/wax-prosemirror-components/src/components/comments/CommentsBoxList.js
new file mode 100644
index 000000000..01299fe17
--- /dev/null
+++ b/wax-prosemirror-components/src/components/comments/CommentsBoxList.js
@@ -0,0 +1,12 @@
+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>
+  );
+};
-- 
GitLab