MCPcopy Create free account
hub / github.com/triggerdotdev/jsonhero-web / PreviewImage

Function PreviewImage

app/components/Preview/Types/PreviewImage.tsx:10–29  ·  view source on GitHub ↗
({ info }: PreviewImageProps)

Source from the content-addressed store, hash-verified

8};
9
10export function PreviewImage({ info }: PreviewImageProps) {
11 let properties: Array<PreviewProperty> = [];
12
13 if (info.mimeType) {
14 properties.push({ key: "mimeType", title: info.mimeType });
15 }
16
17 if (info.size) {
18 properties.push({ key: "fileSize", title: `${formatBytes(info.size)}` });
19 }
20
21 const src = info.image ? info.image.url : info.url;
22
23 return (
24 <PreviewBox link={info.url}>
25 <img className="block max-h-96 w-full object-contain" src={src} />
26 <PreviewProperties properties={properties} />
27 </PreviewBox>
28 );
29}

Callers

nothing calls this directly

Calls 1

formatBytesFunction · 0.90

Tested by

no test coverage detected