Spookify switch

This commit is contained in:
2024-10-11 20:42:30 -03:00
parent a20d5e3d09
commit 540b13c958
6 changed files with 121 additions and 17 deletions

View File

@@ -10,17 +10,23 @@ ring2.register();
quantum.register();
export default function ArtistShowcase({
spookify,
images,
name,
id,
}: {
spookify: boolean;
images: { url: string }[];
name: string;
id: string;
}) {
const [showSpookyImage, setShowSpookyImage] = useState(false);
const [showSpookyImage, setShowSpookyImage] = useState(spookify);
const [spookyImageLoaded, setSpookyImageLoaded] = useState(false);
useEffect(() => {
setShowSpookyImage(spookify);
}, [spookify]);
const imageSource = images[0]
? images[0].url
: "https://via.placeholder.com/150";