Skip to content

Commit

Permalink
Merge pull request #2 from deco-sites/dev
Browse files Browse the repository at this point in the history
fix: use component image in page news
  • Loading branch information
gabrielviol authored Oct 25, 2024
2 parents e963dbc + 4d2a488 commit 6161ca0
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions islands/featured-news.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -103,10 +103,14 @@ export default function FeaturedNewsIsland({

<div class="flex flex-col md:flex-row gap-5">
<div class="relative w-full md:w-2/3 overflow-hidden rounded-2xl">
<img
src={mainNews?.image}
alt={mainNews?.title}
<Image
width={300}
height={274}
class="h-full w-full object-cover brightness-75"
sizes="(max-width: 640px) 100vw, 35vw"
src={mainNews?.image || ''}
alt={mainNews?.image}
decoding="async"
/>
<div class="absolute top-0 left-0 p-4 w-[65%]">
<h2 class="text-3xl md:text-xl lg:text-5xl font-medium text-white">
Expand Down

0 comments on commit 6161ca0

Please sign in to comment.