Skip to content

Commit

Permalink
feat: implement CommentCard
Browse files Browse the repository at this point in the history
  • Loading branch information
2wheeh committed May 9, 2024
1 parent 549fc04 commit b4bc8ec
Showing 1 changed file with 36 additions and 0 deletions.
36 changes: 36 additions & 0 deletions ui/src/components/comment/client/comment-card.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
'use client';

import { CommentCardBody } from '@/components/comment/client/comment-card-body';
import { CommentCardFooter } from '@/components/comment/client/comment-card-footer';
import { CommentCardHeader } from '@/components/comment/client/comment-card-header';
import Card from '@/components/common/server/card';

import { CommentProvider } from '@/context/comment/comment-context';

import type { Comment } from '@/lib/definitions/comment';

export function CommentCard({ comment }: { comment: Comment }) {
return (
<CommentProvider prepopulated={comment}>
<Card>
<Card.Header>
<CommentCardHeader />
</Card.Header>

<Card.Body>
<CommentCardBody />
</Card.Body>

<Card.Footer>
<CommentCardFooter
nickname={comment.nickname}
tag={comment.tag}
createdAt={comment.createdAt}
updatedAt={comment.updatedAt}
authorId={comment.userId}
/>
</Card.Footer>
</Card>
</CommentProvider>
);
}

0 comments on commit b4bc8ec

Please sign in to comment.