feat: prefetch subpage links
CI / Verify (push) Successful in 57s
CI / Build immutable images and deploy (push) Successful in 1m35s

This commit is contained in:
2026-08-31 18:07:07 +07:00 Unverified
parent 1b5957d563
commit e45bd36f5f
+3 -1
View File
@@ -101,6 +101,7 @@ export function StructuredGuideShell({
"flex min-h-8 shrink-0 items-center gap-2 whitespace-nowrap rounded-md px-3 text-sm outline-none focus-visible:ring-2 focus-visible:ring-ring",
!section ? "bg-muted text-foreground" : "text-muted-foreground hover:bg-muted hover:text-foreground",
)}
prefetch
>
<Image src={navigationIconPath("overview")!} alt="" width={20} height={20} className="size-5 object-contain" />
Overview
@@ -113,6 +114,7 @@ export function StructuredGuideShell({
"flex min-h-8 shrink-0 items-center gap-2 whitespace-nowrap rounded-md px-3 text-sm outline-none focus-visible:ring-2 focus-visible:ring-ring",
section === item.slug ? "bg-muted text-foreground" : "text-muted-foreground hover:bg-muted hover:text-foreground",
)}
prefetch
>
{navigationIconPath(item.slug) ? <Image src={navigationIconPath(item.slug)!} alt="" width={20} height={20} className="size-5 object-contain" /> : null}
{item.title}
@@ -159,7 +161,7 @@ function GuideOverview({
{sections.length ? (
<div className="grid gap-4 sm:grid-cols-2 lg:grid-cols-4">
{sections.map((item) => (
<Link key={item.id} href={`/${guide.slug}/${item.slug}`}>
<Link key={item.id} href={`/${guide.slug}/${item.slug}`} prefetch>
<Card className="h-full">
<CardHeader>
{navigationIconPath(item.slug) ? <Image src={navigationIconPath(item.slug)!} alt="" width={40} height={40} className="size-10 object-contain" /> : null}