MCPcopy Create free account
hub / github.com/Botloader/botloader / PluginIcon

Function PluginIcon

frontend/src/components/PluginIcon.tsx:11–24  ·  view source on GitHub ↗
({ plugin, size }: { plugin: Plugin, size?: keyof typeof sizes })

Source from the content-addressed store, hash-verified

9}
10
11export function PluginIcon({ plugin, size }: { plugin: Plugin, size?: keyof typeof sizes }) {
12 const iconImage = plugin.images.find(v => v.kind === "Icon")
13
14 return <Avatar
15 variant="rounded"
16 sx={{
17 width: sizes[size ?? "m"],
18 height: sizes[size ?? "m"],
19 }}
20 src={iconImage ? pluginImageUrl(plugin.id, iconImage.image_id) : undefined}
21 >
22 {plugin.name[0] ?? "?"}
23 </Avatar>
24}

Callers

nothing calls this directly

Calls 1

pluginImageUrlFunction · 0.90

Tested by

no test coverage detected