[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;
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,

@ -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 (
<div>
<CommentCard
comment={comment}
handleExpanded={() => 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}
/>
))}
</div>

Loading…
Cancel
Save