Skip to content

Commit 9307d44

Browse files
committed
fix: remove wrong url
1 parent 5da1812 commit 9307d44

File tree

1 file changed

+1
-4
lines changed
  • src/app/[locale]/(main)/products/[...id]

1 file changed

+1
-4
lines changed

src/app/[locale]/(main)/products/[...id]/page.tsx

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ import {
1717
} from '@mui/material';
1818
import { grey } from '@mui/material/colors';
1919
import type { Metadata } from 'next';
20-
import { headers } from 'next/headers';
2120
import { useTranslations } from 'next-intl';
2221

2322
type PageProps = {
@@ -30,13 +29,11 @@ export async function generateMetadata({
3029
params,
3130
}: PageProps): Promise<Metadata> {
3231
const id = params.id;
33-
const url = new URL(headers().get('x-url')!);
34-
const slug = title.replaceAll(' ', '-');
3532

3633
return {
3734
title,
3835
alternates: {
39-
canonical: `${url.origin}/products/${id}/${slug}`,
36+
canonical: '',
4037
},
4138
};
4239
}

0 commit comments

Comments
 (0)