From 048f9d1d3171e932ffee95bbcb520a7f84cd1822 Mon Sep 17 00:00:00 2001 From: Zhang Ziqing Date: Fri, 14 Oct 2022 22:15:25 +0800 Subject: [PATCH] [offers][feat] add comment components --- .../offers/profile/ProfileComments.tsx | 43 +++++++++++++++- .../offers/profile/comments/CommentCard.tsx | 49 +++++++++++++++++++ .../comments/ExpandableCommentCard.tsx | 30 ++++++++++++ apps/portal/src/components/offers/types.ts | 11 +++++ apps/portal/src/utils/offers/time.tsx | 28 +++++++++++ 5 files changed, 159 insertions(+), 2 deletions(-) create mode 100644 apps/portal/src/components/offers/profile/comments/CommentCard.tsx create mode 100644 apps/portal/src/components/offers/profile/comments/ExpandableCommentCard.tsx diff --git a/apps/portal/src/components/offers/profile/ProfileComments.tsx b/apps/portal/src/components/offers/profile/ProfileComments.tsx index a0a47d43..e3e9bb18 100644 --- a/apps/portal/src/components/offers/profile/ProfileComments.tsx +++ b/apps/portal/src/components/offers/profile/ProfileComments.tsx @@ -1,5 +1,7 @@ import { ClipboardDocumentIcon, ShareIcon } from '@heroicons/react/24/outline'; -import { Button, Spinner } from '@tih/ui'; +import { Button, Spinner, TextArea } from '@tih/ui'; + +import ExpandableCommentCard from './comments/ExpandableCommentCard'; type ProfileHeaderProps = Readonly<{ handleCopyEditLink: () => void; @@ -16,6 +18,9 @@ export default function ProfileComments({ isEditable, isLoading, }: ProfileHeaderProps) { + function handleReply(replayingToId: string, userId: string) { + return replayingToId + userId; // To integrate with API + } if (isLoading) { return (
@@ -52,7 +57,41 @@ export default function ProfileComments({

Discussions feature coming soon

- {/*