perf(images): migrate standard img elements to optimized next/image with AVIF/WebP support
Deploy Canina / deploy (push) Successful in 1m47s
Deploy Canina / deploy (push) Successful in 1m47s
This commit is contained in:
1 parent
d1e3daf992
commit
b91885557e
209 files changed
+254562
-117353
No files matched your search
@@ -16,6 +16,7 @@ import {
|
||||
Loader2,
|
||||
Sparkles
|
||||
} from "lucide-react";
|
||||
import SafeImage from "./SafeImage";
|
||||
|
||||
interface PodcastPlayerModalProps {
|
||||
isOpen: boolean;
|
||||
@@ -277,13 +278,11 @@ export default function PodcastPlayerModal({ isOpen, onClose, podcast }: Podcast
|
||||
{/* Cover Art Artwork */}
|
||||
<div className="relative group my-2">
|
||||
<div className="w-40 h-40 sm:w-48 sm:h-48 rounded-3xl overflow-hidden shadow-2xl border-2 border-white/20 relative bg-neutral-800 flex items-center justify-center">
|
||||
<img
|
||||
<SafeImage
|
||||
src={displayCover}
|
||||
alt={podcast.title || "کاور پادکست"}
|
||||
className={`w-full h-full object-cover transition-transform duration-700 ${isPlaying ? "scale-105" : "scale-100"}`}
|
||||
onError={(e) => {
|
||||
(e.target as HTMLImageElement).src = '/images/default-podcast.png';
|
||||
}}
|
||||
className="w-full h-full"
|
||||
imgClassName={`w-full h-full object-cover transition-transform duration-700 ${isPlaying ? "scale-105" : "scale-100"}`}
|
||||
/>
|
||||
<div className="absolute inset-0 bg-gradient-to-t from-black/60 via-transparent to-transparent pointer-events-none" />
|
||||
|
||||
|
||||
Reference in new issue
Block a user