Skip to content

Commit 3989202

Browse files
committed
fix: fix multiple linting issues
1 parent 796f221 commit 3989202

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

src/app/(home)/blog/[slug]/page.tsx

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import { lastEdit } from "@/lib/api"
22
import { blog } from "@/lib/source"
33
import { getMDXComponents } from "@/mdx-components"
44
import { PathUtils } from "fumadocs-core/source"
5+
import Link from "next/link"
56
import { notFound } from "next/navigation"
67

78
export default async function Page(props: PageProps<"/blog/[slug]">) {
@@ -17,9 +18,9 @@ export default async function Page(props: PageProps<"/blog/[slug]">) {
1718
<div className="grid gap-10 lg:grid-cols-[minmax(0,1fr)_280px]">
1819
<div className="max-w-3xl">
1920
<nav className="mb-6 text-sm text-neutral-500">
20-
<a className="hover:text-white" href="/blog">
21+
<Link className="hover:text-white" href="/blog">
2122
Blog
22-
</a>
23+
</Link>
2324
<span className="mx-2">/</span>
2425
<span className="text-neutral-400">{page?.data.title}</span>
2526
</nav>
@@ -70,14 +71,14 @@ export default async function Page(props: PageProps<"/blog/[slug]">) {
7071
</h3>
7172
<nav className="space-y-1">
7273
{toc.map((item) => (
73-
<a
74+
<Link
7475
key={item.url}
7576
href={item.url}
7677
className="block rounded-md py-1.5 text-sm text-neutral-400 hover:text-white"
7778
style={{ paddingLeft: `${(item.depth - 1) * 12}px` }}
7879
>
7980
{item.title}
80-
</a>
81+
</Link>
8182
))}
8283
</nav>
8384
</div>

src/lib/command-transformer.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ function detectRanges(code: string): MetaRanges {
2424
const re = /<([A-Za-z_+-]+)>([\s\S]*?)<\/\1>/g
2525
let match: RegExpExecArray | null
2626
while ((match = re.exec(code)) !== null) {
27-
const [full, colorName, inner] = match
27+
const [full, colorName] = match
2828
const openStart = match.index
2929
const openEnd = openStart + `<${colorName}>`.length
3030
const closeEnd = openStart + full.length

0 commit comments

Comments
 (0)