MCPcopy Create free account
hub / github.com/Acode-Foundation/Acode / Item

Function Item

src/pages/plugins/item.js:18–50  ·  view source on GitHub ↗
({
	id,
	name,
	icon,
	version,
	license,
	author,
	price,
	currencySymbol,
	author_verified,
	downloads,
	installed,
	enabled,
	onToggleEnabled,
	updates,
})

Source from the content-addressed store, hash-verified

16 * @returns
17 */
18export default function Item({
19 id,
20 name,
21 icon,
22 version,
23 license,
24 author,
25 price,
26 currencySymbol,
27 author_verified,
28 downloads,
29 installed,
30 enabled,
31 onToggleEnabled,
32 updates,
33}) {
34 const authorName = (() => {
35 const displayName =
36 typeof author === "object" ? author.name : author || "Unknown";
37 // Check if it's likely an email or too long
38 if (displayName.includes("@") || displayName.length > 20) {
39 return displayName.substring(0, 20) + "...";
40 }
41 return displayName;
42 })();
43
44 return (
45 <div
46 data-id={id}
47 data-plugin-enabled={enabled !== false}
48 className="list-item"
49 data-action="open"
50 data-installed={(!!installed).toString()}
51 style={enabled === false ? { opacity: 0.6 } : {}}
52 >
53 <div className="plugin-header">

Callers

nothing calls this directly

Calls 1

toStringMethod · 0.45

Tested by

no test coverage detected