Skip to content

Commit

Permalink
Fix some Picture component typescript errors
Browse files Browse the repository at this point in the history
  • Loading branch information
prototypa committed Jan 31, 2023
1 parent 67f43c6 commit d4560c1
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/components/blog/GridItem.astro
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,13 @@ const image = await findImage(post.image);
src={image}
class="md:object-cover w-full md:w-auto md:h-full rounded shadow-lg bg-gray-400 dark:bg-slate-700"
widths={[400, 900]}
width="400"
height="224"
width={400}
height={224}
sizes="(max-width: 900px) 400px, 900px"
alt={post.title}
aspectRatio="16:9"
loading="lazy"
decoding="async"
/>
)
}
Expand Down
3 changes: 3 additions & 0 deletions src/components/blog/SinglePost.astro
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,9 @@ const { post, url } = Astro.props;
aspectRatio={16 / 9}
width={900}
height={506}
loading="eager"
decoding="async"
background={undefined}
/>
) : (
<div class="max-w-3xl mx-auto px-4 sm:px-6">
Expand Down

0 comments on commit d4560c1

Please sign in to comment.