From 3a1df6614742742ba203bf72615ea00a6d7a55af Mon Sep 17 00:00:00 2001 From: "arjxn.py" Date: Mon, 16 Oct 2023 05:14:25 +0530 Subject: [PATCH] Make `Comment` an arrow function --- src/components/comments/Comment.tsx | 6 ++++-- src/components/comments/Comments.tsx | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/components/comments/Comment.tsx b/src/components/comments/Comment.tsx index c05663b..fe7e094 100644 --- a/src/components/comments/Comment.tsx +++ b/src/components/comments/Comment.tsx @@ -7,7 +7,7 @@ interface CommentProps { commentText: string; } -export function Comment(props: CommentProps) { +const Comment = (props: CommentProps) => { return (
); -} +}; + +export default Comment; diff --git a/src/components/comments/Comments.tsx b/src/components/comments/Comments.tsx index 89900f5..c38a410 100644 --- a/src/components/comments/Comments.tsx +++ b/src/components/comments/Comments.tsx @@ -1,7 +1,7 @@ import React from "react"; import CommentsHeader from "./CommentsHeader"; import AddComment from "./AddComment"; -import { Comment } from "./Comment"; +import Comment from "./Comment"; // Define a type for your comment objects interface CommentObject {