Skip to content

Commit

Permalink
revert: "fix: optimize Image component" (#172)
Browse files Browse the repository at this point in the history
  • Loading branch information
moonlitgrace authored Oct 31, 2024
1 parent 6487268 commit a01d896
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 9 deletions.
1 change: 1 addition & 0 deletions app/(routes)/(main)/blog/[slug]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ export default async function Page(props: { params: Promise<{ slug: string }> })
priority={true}
width={0}
height={0}
sizes="100vw"
style={{ width: '100%', height: 'auto' }}
className="rounded-2xl"
/>
Expand Down
19 changes: 10 additions & 9 deletions app/(routes)/(main)/blog/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -43,15 +43,16 @@ export default async function BlogPage() {
)}
>
{post.cover && (
<div className="relative aspect-video h-auto w-full">
<Image
src={post.cover}
alt={post.title}
priority={true}
fill
className="rounded-2xl"
/>
</div>
<Image
src={post.cover}
alt={post.title}
priority={true}
width={0}
height={0}
sizes="100vw"
style={{ width: '100%', height: 'auto' }}
className="rounded-2xl"
/>
)}
<div className="flex flex-col gap-2">
<div className="flex items-center justify-between">
Expand Down

0 comments on commit a01d896

Please sign in to comment.