🎥 Make videos programmatically with React
Update PromptsGallery.tsx
JonnyBurgerb5ff7572df67
diff --git a/packages/promo-pages/src/components/prompts/PromptsGallery.tsx b/packages/promo-pages/src/components/prompts/PromptsGallery.tsxindex a1c715ce5e..ee5bd6d13c 100644--- a/packages/promo-pages/src/components/prompts/PromptsGallery.tsx+++ b/packages/promo-pages/src/components/prompts/PromptsGallery.tsx@@ -42,15 +42,17 @@ const SubmissionCard: React.FC<{readonly submission: Submission}> = ({onMouseLeave={() => setHovered(false)}><Card className="overflow-hidden hover:shadow-md transition-shadow">- <img- src={- showGif- ? `https://image.mux.com/${submission.muxPlaybackId}/animated.gif?width=400&height=225&fit_mode=smartcrop`- : `https://image.mux.com/${submission.muxPlaybackId}/thumbnail.png?width=400&height=225&fit_mode=smartcrop`- }- className="w-full aspect-video object-cover"- alt={submission.title}- />+ <div className="w-full aspect-video bg-black flex items-center justify-center overflow-hidden">+ <img+ src={+ showGif+ ? `https://image.mux.com/${submission.muxPlaybackId}/animated.gif?height=225&fit_mode=smartcrop`+ : `https://image.mux.com/${submission.muxPlaybackId}/thumbnail.png?width=400&height=225&fit_mode=smartcrop`+ }+ className={showGif ? 'h-full' : 'w-full h-full object-cover'}+ alt={submission.title}+ />+ </div><div className="p-4"><h3 className="font-brand font-bold text-lg truncate">{submission.title}