+ likelyVideo.startsWith("https://watch.videodelivery.net/") ? (
+
playerRef(e)}
src={likelyVideo.replace("https://watch.videodelivery.net/", "")}
@@ -140,27 +156,33 @@ const VideoArtContent = ({
autoplay={true}
muted={true}
/>
+
) : (
-
- );
+
+
+ {(likelyVideo || animationURL) && (
+
+ )}
+
+ )
return content;
};
@@ -172,7 +194,8 @@ const HTMLContent = ({
animationUrl?: string;
files?: (MetadataJsonFile | string)[];
}) => {
- const [loaded, setLoaded] = useState
(false);
+ const [isLoading, setIsLoading] = useState(true);
+ const [showError, setShowError] = useState(false);
const htmlURL =
files && files.length > 0 && typeof files[0] === "string"
? files[0]
@@ -180,22 +203,35 @@ const HTMLContent = ({
return (
<>
- {!loaded && }
-
+ {showError ? (
+
+
+
Error Loading Image
+
+ ) : (
+ <>
+ {!isLoading && }
+
+
+ {htmlURL && (
+
+ )}
+
+ >
+ )}
>
);
};