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

Function ExtensionsGrid

app/page.tsx:55–94  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

53}
54
55function ExtensionsGrid() {
56 const extensions = useQuery(api.extensions.listAllApproved)
57
58 if (extensions === undefined) {
59 return (
60 <div className="grid gap-4 md:grid-cols-2 lg:grid-cols-3">
61 {[1, 2, 3, 4, 5, 6].map((i) => (
62 <div
63 key={i}
64 className="h-40 animate-pulse rounded border border-[var(--color-border-weak)] bg-[var(--color-bg-weak)]"
65 />
66 ))}
67 </div>
68 )
69 }
70
71 if (extensions.length === 0) {
72 return (
73 <div className="flex flex-col items-center justify-center gap-4 rounded border border-[var(--color-border-weak)] bg-[var(--color-bg-weak)] py-16">
74 <p className="text-[var(--color-text-weak)]">No extensions yet</p>
75 <Authenticated>
76 <Link
77 href="/submit"
78 className="rounded bg-[var(--color-bg-strong)] px-4 py-2 text-sm font-medium text-[var(--color-text-inverted)] transition-colors hover:bg-[var(--color-bg-strong-hover)]"
79 >
80 Be the first to submit
81 </Link>
82 </Authenticated>
83 </div>
84 )
85 }
86
87 return (
88 <div className="grid gap-4 md:grid-cols-2 lg:grid-cols-3">
89 {extensions.map((ext) => (
90 <ExtensionCard key={ext._id} extension={ext} />
91 ))}
92 </div>
93 )
94}
95
96function CategoryCounts() {
97 const extensions = useQuery(api.extensions.listAllApproved)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected