From 272802cfbbbcfe59e9266fc05fc5ec9810286a98 Mon Sep 17 00:00:00 2001 From: Zhang Ziqing Date: Wed, 19 Oct 2022 17:31:37 +0800 Subject: [PATCH] [offers][chore] remove comments --- .../components/offers/profile/comments/CommentCard.tsx | 4 ---- .../offers/profile/comments/ExpandableCommentCard.tsx | 10 ++-------- 2 files changed, 2 insertions(+), 12 deletions(-) diff --git a/apps/portal/src/components/offers/profile/comments/CommentCard.tsx b/apps/portal/src/components/offers/profile/comments/CommentCard.tsx index 3ddd8cc1..beeea146 100644 --- a/apps/portal/src/components/offers/profile/comments/CommentCard.tsx +++ b/apps/portal/src/components/offers/profile/comments/CommentCard.tsx @@ -13,9 +13,7 @@ type Props = Readonly<{ comment: Reply; disableReply?: boolean; handleExpanded?: () => void; - // HandleReply?: (message: string, replyingToId: string) => void; isExpanded?: boolean; - // IsLoading?: boolean; profileId: string; replyLength?: number; token?: string; @@ -25,9 +23,7 @@ export default function CommentCard({ comment: { createdAt, id, message, user }, disableReply, handleExpanded, - // HandleReply, isExpanded, - // IsLoading, profileId, token = '', replyLength = 0, diff --git a/apps/portal/src/components/offers/profile/comments/ExpandableCommentCard.tsx b/apps/portal/src/components/offers/profile/comments/ExpandableCommentCard.tsx index 5baf2e68..af8bd592 100644 --- a/apps/portal/src/components/offers/profile/comments/ExpandableCommentCard.tsx +++ b/apps/portal/src/components/offers/profile/comments/ExpandableCommentCard.tsx @@ -6,8 +6,6 @@ import type { Reply } from '~/types/offers'; type Props = Readonly<{ comment: Reply; - // HandleReply?: (message: string, replyingToId: string) => void; - // isLoading?: boolean; profileId: string; token?: string; }>; @@ -16,20 +14,16 @@ export default function ExpandableCommentCard({ comment, profileId, token = '', -}: // HandleReply, -// isLoading, -Props) { +}: Props) { const [isExpanded, setIsExpanded] = useState(false); return (
setIsExpanded(!isExpanded)} - // HandleReply={handleReply} isExpanded={isExpanded} profileId={profileId} replyLength={comment.replies?.length ?? 0} - // IsLoading={isLoading} token={token} /> {comment.replies && ( @@ -40,7 +34,7 @@ Props) { key={reply.id} comment={reply} disableReply={true} - profileId={profileId} // IsLoading={isLoading} + profileId={profileId} /> ))}