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

Function SubmissionPreview

app/submit/page.tsx:57–175  ·  view source on GitHub ↗
({ data, authorName }: { data: FormData; authorName: string })

Source from the content-addressed store, hash-verified

55}
56
57function SubmissionPreview({ data, authorName }: { data: FormData; authorName: string }) {
58 const typeInfo = EXTENSION_TYPE_LIST.find((t) => t.value === data.type)
59 const tags = data.tags.split(",").map((t) => t.trim()).filter(Boolean)
60
61 return (
62 <div className="flex flex-col gap-6">
63 {/* Header */}
64 <div className="flex items-start justify-between gap-4">
65 <div className="flex flex-col gap-1">
66 <h2 className="text-xl font-semibold text-[var(--color-text-strong)]">
67 {data.displayName || "Extension Name"}
68 </h2>
69 <p className="text-sm text-[var(--color-text-weak)]">
70 by {authorName}
71 </p>
72 </div>
73 {typeInfo && (
74 <Badge variant="secondary">{typeInfo.label}</Badge>
75 )}
76 </div>
77
78 {/* Description */}
79 <div>
80 <p className="text-sm leading-relaxed text-[var(--color-text)]">
81 {data.description || "No description provided."}
82 </p>
83 </div>
84
85 {/* Tags */}
86 {tags.length > 0 && (
87 <div className="flex flex-wrap gap-2">
88 {tags.map((tag, i) => (
89 <Badge key={i} variant="outline">{tag}</Badge>
90 ))}
91 </div>
92 )}
93
94 {/* Links */}
95 <div className="flex flex-col gap-2 text-sm">
96 {data.repoUrl && (
97 <div className="flex items-center gap-2">
98 <span className="text-[var(--color-text-weak)]">Repository:</span>
99 <a
100 href={data.repoUrl}
101 target="_blank"
102 rel="noopener noreferrer"
103 className="text-[var(--color-text-strong)] underline underline-offset-2"
104 >
105 {data.repoUrl}
106 </a>
107 </div>
108 )}
109 {data.homepageUrl && (
110 <div className="flex items-center gap-2">
111 <span className="text-[var(--color-text-weak)]">Homepage:</span>
112 <a
113 href={data.homepageUrl}
114 target="_blank"

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected