diff --git a/src/app/products/[id]/page.tsx b/src/app/products/[id]/page.tsx index 84b0010..87f9c8c 100644 --- a/src/app/products/[id]/page.tsx +++ b/src/app/products/[id]/page.tsx @@ -23,8 +23,8 @@ export async function generateMetadata( const service = queryClient.getQueryData(getProductBySlugQueryOptions(id).queryKey) as ServiceDetailResponse return { - title: 'محصولات داناک' + ' | ' + service.data.danakService.name, - description: service.data.danakService.metaDescription, + title: service.data.danakService.pageTitle || 'محصولات داناک' + ' | ' + service.data.danakService.name, + description: (service.data.danakService.metaDescription || '').replace(/<[^>]*>/g, ''), } } diff --git a/src/app/products/types/ProductTypes.ts b/src/app/products/types/ProductTypes.ts index b5f246a..eb58e5f 100644 --- a/src/app/products/types/ProductTypes.ts +++ b/src/app/products/types/ProductTypes.ts @@ -60,6 +60,7 @@ export interface DanakService { icon: string; coverUrl: string; slug: string; + pageTitle: string; category: { id: string; title: string;