From 86d8a2a589f7ce509f87963677636eef5fb85303 Mon Sep 17 00:00:00 2001 From: hamid zarghami Date: Sun, 17 Aug 2025 12:41:43 +0330 Subject: [PATCH] page title --- src/app/products/[id]/page.tsx | 4 ++-- src/app/products/types/ProductTypes.ts | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) 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;