From 74ab98ad2f712fa56ad6095aaabc7a7a52ae1d65 Mon Sep 17 00:00:00 2001 From: Unchained Date: Tue, 24 Mar 2026 11:38:14 +0200 Subject: [PATCH] fix: multiple components using wrong locale for ProductCard links - homepage page.tsx was passing productLocale (SR/EN) instead of locale (sr/en) to ProductCard - ProductShowcase default locale was "SR" instead of "sr" - ProductBenefits default locale was "SR" instead of "sr" These caused URLs like /en/SR/products/... when clicking products --- src/app/[locale]/page.tsx | 2 +- src/components/home/ProductShowcase.tsx | 2 +- src/components/product/ProductBenefits.tsx | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/app/[locale]/page.tsx b/src/app/[locale]/page.tsx index 7086bee..5b633d0 100644 --- a/src/app/[locale]/page.tsx +++ b/src/app/[locale]/page.tsx @@ -78,7 +78,7 @@ export default async function Homepage({ params }: { params: Promise<{ locale: s
{featuredProducts.map((product, index) => ( - + ))}
diff --git a/src/components/home/ProductShowcase.tsx b/src/components/home/ProductShowcase.tsx index 487097c..48cea43 100644 --- a/src/components/home/ProductShowcase.tsx +++ b/src/components/home/ProductShowcase.tsx @@ -9,7 +9,7 @@ interface ProductShowcaseProps { locale?: string; } -export default function ProductShowcase({ products, locale = "SR" }: ProductShowcaseProps) { +export default function ProductShowcase({ products, locale = "sr" }: ProductShowcaseProps) { if (!products || products.length === 0) return null; return ( diff --git a/src/components/product/ProductBenefits.tsx b/src/components/product/ProductBenefits.tsx index 458d319..4c3677b 100644 --- a/src/components/product/ProductBenefits.tsx +++ b/src/components/product/ProductBenefits.tsx @@ -7,7 +7,7 @@ interface ProductBenefitsProps { locale?: string; } -export default function ProductBenefits({ locale = "SR" }: ProductBenefitsProps) { +export default function ProductBenefits({ locale = "sr" }: ProductBenefitsProps) { const t = useTranslations("ProductBenefits"); const benefits = [