Skip to content

Commit

Permalink
Merge pull request #944 from bounswe/FRONTEND-942
Browse files Browse the repository at this point in the history
fix(frontend): made forum recursive AGAIN
  • Loading branch information
Elifnurdeniz authored Dec 16, 2024
2 parents 3381cc3 + dc4d222 commit 51d3187
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 51d3187

Please sign in to comment.