Skip to content

Commit

Permalink
fix(frontend): made forum recursive AGAIN
Browse files Browse the repository at this point in the history
  • Loading branch information
Elifnurdeniz committed Dec 16, 2024
1 parent 3381cc3 commit dc4d222
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion frontend/src/pages/post.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,9 @@ export default function Post() {
console.log(response.data);
const postData: PostResponse = response.data.post;
setPost(convertPostResponseToPost(postData));
setComments(convertPostResponseToPost(postData).comments);
setComments(
convertPostResponseToPost(postData).comments.filter((comment) => comment.parent === Number(postID))
);
})
.catch((error) => {
console.log(error);
Expand Down

0 comments on commit dc4d222

Please sign in to comment.