Skip to content

Commit 586d291

Browse files
committed
Add link to full site search in blog home
- Introduced a new link in the blog home component that directs users to the full site search. - The link is conditionally rendered based on the presence of a search query and includes prefetching for improved performance. This enhancement improves user navigation by providing direct access to the full search functionality.
1 parent 5132067 commit 586d291

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

app/routes/blog.tsx

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -421,6 +421,15 @@ function BlogHome() {
421421
{matchingPosts.length}
422422
</div>
423423
</div>
424+
<div className="mt-2 pl-14 pr-6 text-sm text-slate-500">
425+
<Link
426+
to={query ? `/search?q=${encodeURIComponent(query)}` : '/search'}
427+
prefetch="intent"
428+
className="underlined inline-block hover:text-team-current focus:text-team-current"
429+
>
430+
Try the full site search
431+
</Link>
432+
</div>
424433
</form>
425434
</div>
426435
}

0 commit comments

Comments
 (0)