diff --git a/src/components/Article/Comment.tsx b/src/components/Article/Comment.tsx
index f7f0b1a0..ec3ba0bc 100644
--- a/src/components/Article/Comment.tsx
+++ b/src/components/Article/Comment.tsx
@@ -41,10 +41,10 @@ export default (props: Props) => {
event.preventDefault()
// await createReaction({
await apiClient.createReaction({
- kind: 7,
replyTo: props.parent,
body: postMessageText(),
- shout: comment().shout.slug
+ shout: comment().shout.slug,
+ kind: 7
})
}
const formattedDate = createMemo(() =>
@@ -168,9 +168,6 @@ export default (props: Props) => {
-
-
-
)
}
diff --git a/src/components/Article/CommentsTree.tsx b/src/components/Article/CommentsTree.tsx
index 02e2ad60..6ed45c06 100644
--- a/src/components/Article/CommentsTree.tsx
+++ b/src/components/Article/CommentsTree.tsx
@@ -53,24 +53,6 @@ export const CommentsTree = (props: { shoutSlug: string }) => {
}
onMount(async () => await loadMore())
- const nestComments = (commentList) => {
- const commentMap = {}
- commentList.forEach((comment) => {
- commentMap[comment.id] = comment
- if (comment.replyTo !== null) {
- const parent = commentMap[comment.replyTo] ?? []
- ;(parent.children = parent.children || []).push(comment)
- }
- })
- return commentList.filter((comment) => {
- return !comment.replyTo
- })
- }
-
- createEffect(() => {
- console.log('!!! re:', nestComments(reactions()))
- })
-
return (
<>
}>
@@ -106,16 +88,13 @@ export const CommentsTree = (props: { shoutSlug: string }) => {