Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions src/components/Category/Categories.component.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,7 @@ const Categories = ({ categories }: ICategoriesProps) => (
{categories.map(({ id, name, slug }) => (
<Link
key={uuidv4()}
as={`/kategori/${slug}?id=${id}`}
href="/kategori/[id]"
passHref
href={`/kategori/${encodeURIComponent(slug)}?id=${encodeURIComponent(id)}`}
>
<div className="p-6 cursor-pointer">
<div className="flex items-center justify-center w-full h-16 text-center border border-gray-300 rounded-lg shadow hover:shadow-outline">
Expand Down
10 changes: 7 additions & 3 deletions src/components/Product/DisplayProducts.component.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,10 @@ interface IDisplayProductsProps {

const DisplayProducts = ({ products }: IDisplayProductsProps) => (
<section className="container mx-auto bg-white">
<div id="product-container" className="flex flex-wrap items-center mb-[120px] md:mb-0">
<div
id="product-container"
className="flex flex-wrap items-center mb-[120px] md:mb-0"
>
{products ? (
products.map(
({
Expand Down Expand Up @@ -103,7 +106,6 @@ const DisplayProducts = ({ products }: IDisplayProductsProps) => (
)}
</span>
</Link>

<Link
href={`/produkt/${encodeURIComponent(
slug,
Expand Down Expand Up @@ -132,7 +134,9 @@ const DisplayProducts = ({ products }: IDisplayProductsProps) => (
)}
{/* Display regular price when not on sale */}
{!onSale && (
<p className="pt-1 text-center text-gray-900 text-xl">{price}</p>
<p className="pt-1 text-center text-gray-900 text-xl">
{price}
</p>
)}
</div>
);
Expand Down
Loading