MCPcopy Create free account
hub / github.com/R44VC0RP/opencode.cafe / ExtensionCard

Function ExtensionCard

app/page.tsx:13–53  ·  view source on GitHub ↗
({ extension }: { extension: {
  productId: string
  displayName: string
  description: string
  type: string
  author: { name: string }
  tags: string[]
} })

Source from the content-addressed store, hash-verified

11import { Header } from "@/components/header"
12
13function ExtensionCard({ extension }: { extension: {
14 productId: string
15 displayName: string
16 description: string
17 type: string
18 author: { name: string }
19 tags: string[]
20} }) {
21 const typeInfo = EXTENSION_TYPES[extension.type as ExtensionType]
22
23 return (
24 <Link
25 href={`/plugin/${extension.productId}`}
26 className="group flex flex-col gap-4 rounded-xl border border-[var(--color-border-weak)] bg-[var(--color-bg-weak)] p-5 transition-all hover:border-[var(--color-border)] hover:bg-[var(--color-bg-weak-hover)] hover:shadow-sm"
27 >
28 <div className="flex items-start justify-between">
29 <div className="flex flex-col gap-1">
30 <span className="font-medium text-[var(--color-text-strong)]">
31 {extension.displayName}
32 </span>
33 <span className="text-xs text-[var(--color-text-weak)]">
34 Submitted by {extension.author.name}
35 </span>
36 </div>
37 <Badge variant="secondary">{typeInfo?.label || extension.type}</Badge>
38 </div>
39 <p className="text-sm leading-relaxed text-[var(--color-text)] line-clamp-2">
40 {extension.description}
41 </p>
42 {extension.tags.length > 0 && (
43 <div className="flex flex-wrap gap-1">
44 {extension.tags.slice(0, 3).map((tag, i) => (
45 <span key={i} className="text-xs text-[var(--color-text-weak)]">
46 #{tag}
47 </span>
48 ))}
49 </div>
50 )}
51 </Link>
52 )
53}
54
55function ExtensionsGrid() {
56 const extensions = useQuery(api.extensions.listAllApproved)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected