Sniberb
Sniberb3y ago

⛄ Snowberb ⛄ – 12-28 Jul 18

What's better or cleaner? To conditionally set the Image source or to conditionally render the image
<div className="relative flex min-w-[250px] w-[250px] h-full rounded-lg overflow-hidden">
<Image
src={getBookieImageSrc(bonus.bookie.toLowerCase())}
layout="fill"
objectFit="cover"
alt=""
/>
</div>
<div className="relative flex min-w-[250px] w-[250px] h-full rounded-lg overflow-hidden">
<Image
src={getBookieImageSrc(bonus.bookie.toLowerCase())}
layout="fill"
objectFit="cover"
alt=""
/>
</div>
or
<div className="relative flex min-w-[250px] w-[250px] h-full rounded-lg overflow-hidden">
{getBookieImageSrc(bonus.bookie.toLowerCase())}
</div>
<div className="relative flex min-w-[250px] w-[250px] h-full rounded-lg overflow-hidden">
{getBookieImageSrc(bonus.bookie.toLowerCase())}
</div>
2 Replies
Unknown User
Unknown User3y ago
Message Not Public
Sign In & Join Server To View
reactibot
reactibot3y ago
This thread hasn’t had any activity in 12 hours, so it’s now locked. Threads are closed automatically after 12 hours. If you have a followup question, you may want to reply to this thread so other members know they're related. https://discord.com/channels/102860784329052160/565213527673929729/998566843222605885