diff --git a/frontend/src/components/files/ViewImage.tsx b/frontend/src/components/files/ViewImage.tsx index 8060ebb1..f5c68ac0 100644 --- a/frontend/src/components/files/ViewImage.tsx +++ b/frontend/src/components/files/ViewImage.tsx @@ -2,11 +2,10 @@ import React from "react"; interface ImageProps { url: string; - size: "small" | "large"; caption?: string; } -const ImageComponent: React.FC = ({ url, size, caption }) => { +const ImageComponent: React.FC = ({ url, caption }) => { return (
{ fetchArtifacts(); }, [listing_id]); - return ( - <> - -

URDF Downloads

-

URDFs are ordered in descending order of recency. (That is, the most recent URDF is at the top, and the oldest URDF at the bottom.)

- {artifacts && - artifacts.artifacts.map( - (artifact, index) => - artifact.artifact_type === "urdf" && ( - {artifact.name} - ), - )} -
- - 1} - > - {artifacts === null || artifacts.artifacts.length === 0 ? ( - - ) : ( - artifacts.artifacts.map((artifact, key) => ( - -
- {artifact.artifact_type === "image" ? ( - - ) : ( -

Unhandled artifact type: {artifact.artifact_type}

+ if (artifacts != null && artifacts.artifacts.length > 0) { + return ( + <> + +

URDF Downloads

+

+ URDFs are ordered in descending order of recency. (That is, the most + recent URDF is at the top, and the oldest URDF at the bottom.) +

+ {artifacts && + artifacts.artifacts.map( + (artifact, index) => + artifact.artifact_type === "urdf" && ( + + {artifact.name} + + ), + )} +
+ + 1} + > + {artifacts === null || artifacts.artifacts.length === 0 ? ( + + ) : ( + artifacts.artifacts.map((artifact, key) => ( + +
+ {artifact.artifact_type === "image" ? ( + + ) : ( +

Unhandled artifact type: {artifact.artifact_type}

+ )} +
+ {artifact.description && ( + + {artifact.description} + )} -
- {artifact.description && - - {artifact.description} - - } -
- )) - )} -
-
- - ); + + )) + )} + + + + ); + } else { + return <>; + } }; export default ListingArtifacts;