Skip to content

Commit e50c173

Browse files
committed
Improve the dynamic links of categories
1 parent 052d9db commit e50c173

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/components/Category/Categories.component.tsx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,7 @@ const Categories = ({ categories }: ICategoriesProps) => (
1111
{categories.map(({ id, name, slug }) => (
1212
<Link
1313
key={uuidv4()}
14-
as={`/kategori/${slug}?id=${id}`}
15-
href="/kategori/[id]"
16-
passHref
14+
href={`/kategori/${encodeURIComponent(slug)}?id=${encodeURIComponent(id)}`}
1715
>
1816
<div className="p-6 cursor-pointer">
1917
<div className="flex items-center justify-center w-full h-16 text-center border border-gray-300 rounded-lg shadow hover:shadow-outline">

0 commit comments

Comments
 (0)