Skip to content

Commit

Permalink
use <Link> in search results
Browse files Browse the repository at this point in the history
  • Loading branch information
RhysSullivan committed Oct 18, 2024
1 parent 4f540c9 commit 2d068e8
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/app/(category-sidebar)/layout.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { db } from "@/db";
import Link from "next/link";

export default async function Layout({
children,
Expand All @@ -17,12 +18,12 @@ export default async function Layout({
<ul className="flex flex-col items-start justify-center">
{allCategories.map((category) => (
<li key={category.name} className="w-full">
<a
<Link
href={`/products/${category.slug}`}
className="block w-full py-1 text-xs text-gray-800 hover:bg-yellow-100 hover:underline"
>
{category.name}
</a>
</Link>
</li>
))}
</ul>
Expand Down

0 comments on commit 2d068e8

Please sign in to comment.