Skip to content

Commit

Permalink
perf: optimize next/image properties
Browse files Browse the repository at this point in the history
  • Loading branch information
moonlitgrace committed Aug 26, 2024
1 parent d3df0a5 commit a4251ab
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions app/writings/[slug]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,9 @@ export default async function Page({ params }: { params: { slug: string } }) {
<Image
src={postData.cover}
alt={postData.title}
priority={true}
fill
objectFit="cover"
className="rounded-2xl"
className="rounded-2xl object-cover"
/>
</div>
)}
Expand Down
4 changes: 2 additions & 2 deletions components/toc.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ const TableOfContents = ({ headings }: { headings: string[] }) => {
>
<h3 className="font-bold">Table of Contents</h3>
<div className="flex flex-col gap-1">
{headings.map((heading) => (
<a className="w-max font-medium underline" href={`#${escapeText(heading)}`}>
{headings.map((heading, idx) => (
<a key={idx} className="w-max font-medium underline" href={`#${escapeText(heading)}`}>
<span className="text-primary">#.&nbsp;</span>
{heading}
</a>
Expand Down

0 comments on commit a4251ab

Please sign in to comment.