MCPcopy
hub / github.com/shadcn-ui/taxonomy / PostItem

Function PostItem

components/post-item.tsx:12–31  ·  view source on GitHub ↗
({ post }: PostItemProps)

Source from the content-addressed store, hash-verified

10}
11
12export function PostItem({ post }: PostItemProps) {
13 return (
14 <div className="flex items-center justify-between p-4">
15 <div className="grid gap-1">
16 <Link
17 href={`/editor/${post.id}`}
18 className="font-semibold hover:underline"
19 >
20 {post.title}
21 </Link>
22 <div>
23 <p className="text-sm text-muted-foreground">
24 {formatDate(post.createdAt?.toDateString())}
25 </p>
26 </div>
27 </div>
28 <PostOperations post={{ id: post.id, title: post.title }} />
29 </div>
30 )
31}
32
33PostItem.Skeleton = function PostItemSkeleton() {
34 return (

Callers

nothing calls this directly

Calls 1

formatDateFunction · 0.90

Tested by

no test coverage detected