[offers][chore] remove comments

pull/392/head
Zhang Ziqing 3 years ago
parent 86029ff266
commit 272802cfbb

@ -13,9 +13,7 @@ type Props = Readonly<{
comment: Reply; comment: Reply;
disableReply?: boolean; disableReply?: boolean;
handleExpanded?: () => void; handleExpanded?: () => void;
// HandleReply?: (message: string, replyingToId: string) => void;
isExpanded?: boolean; isExpanded?: boolean;
// IsLoading?: boolean;
profileId: string; profileId: string;
replyLength?: number; replyLength?: number;
token?: string; token?: string;
@ -25,9 +23,7 @@ export default function CommentCard({
comment: { createdAt, id, message, user }, comment: { createdAt, id, message, user },
disableReply, disableReply,
handleExpanded, handleExpanded,
// HandleReply,
isExpanded, isExpanded,
// IsLoading,
profileId, profileId,
token = '', token = '',
replyLength = 0, replyLength = 0,

@ -6,8 +6,6 @@ import type { Reply } from '~/types/offers';
type Props = Readonly<{ type Props = Readonly<{
comment: Reply; comment: Reply;
// HandleReply?: (message: string, replyingToId: string) => void;
// isLoading?: boolean;
profileId: string; profileId: string;
token?: string; token?: string;
}>; }>;
@ -16,20 +14,16 @@ export default function ExpandableCommentCard({
comment, comment,
profileId, profileId,
token = '', token = '',
}: // HandleReply, }: Props) {
// isLoading,
Props) {
const [isExpanded, setIsExpanded] = useState(false); const [isExpanded, setIsExpanded] = useState(false);
return ( return (
<div> <div>
<CommentCard <CommentCard
comment={comment} comment={comment}
handleExpanded={() => setIsExpanded(!isExpanded)} handleExpanded={() => setIsExpanded(!isExpanded)}
// HandleReply={handleReply}
isExpanded={isExpanded} isExpanded={isExpanded}
profileId={profileId} profileId={profileId}
replyLength={comment.replies?.length ?? 0} replyLength={comment.replies?.length ?? 0}
// IsLoading={isLoading}
token={token} token={token}
/> />
{comment.replies && ( {comment.replies && (
@ -40,7 +34,7 @@ Props) {
key={reply.id} key={reply.id}
comment={reply} comment={reply}
disableReply={true} disableReply={true}
profileId={profileId} // IsLoading={isLoading} profileId={profileId}
/> />
))} ))}
</div> </div>

Loading…
Cancel
Save