Skip to content

Commit 27e0205

Browse files
Sebastiano-BertolinmarcobottaroMarcoPonchia
authored
[DEV-3772] Add locale to link in product cards in case histories and solutions (#2127)
* Add locale support to ProductsShowcase and CaseHistoryPageTemplate components * Fix locale handling in ProductsShowcase and SolutionTemplate components * Fix locale handling in ProductsShowcase and CaseHistoryPageTemplate components * add changeset --------- Co-authored-by: marcobottaro <39835990+marcobottaro@users.noreply.github.com> Co-authored-by: Marco Ponchia <ponchia.marco1994@gmail.com>
1 parent 877450a commit 27e0205

File tree

4 files changed

+7
-3
lines changed

4 files changed

+7
-3
lines changed

.changeset/loose-socks-allow.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"nextjs-website": patch
3+
---
4+
5+
Fix product cards' link without locale in solutions and case histories

apps/nextjs-website/src/app/[locale]/case-histories/[caseHistorySlug]/page.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ import {
1111
convertSeoToStructuredDataArticle,
1212
getItemFromPaths,
1313
} from '@/helpers/structuredData.helpers';
14-
import { SUPPORTED_LOCALES } from '@/locales';
1514

1615
type Params = {
1716
locale: string;

apps/nextjs-website/src/components/templates/CaseHistoryTemplate/CaseHistoryPageTemplate.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ const CaseHistoryPageTemplate = ({
4848
return {
4949
title: product.name,
5050
text: product.description,
51-
href: `/${product.slug}/overview`,
51+
href: `/${locale}/${product.slug}/overview`,
5252
logoUrl: product.logo?.url,
5353
};
5454
})

apps/nextjs-website/src/components/templates/SolutionTemplate/SolutionTemplate.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ const SolutionTemplate = ({
157157
cards={products.map((product) => ({
158158
title: product.name,
159159
text: product.description || '',
160-
href: `/${product.slug}/overview`,
160+
href: `/${locale}/${product.slug}/overview`,
161161
logoUrl: product.logo?.url || '',
162162
}))}
163163
/>

0 commit comments

Comments
 (0)