diff --git a/src/app/[locale]/about/page.tsx b/src/app/[locale]/about/page.tsx index d384577..e874d5c 100644 --- a/src/app/[locale]/about/page.tsx +++ b/src/app/[locale]/about/page.tsx @@ -4,13 +4,13 @@ import { AboutData } from '@/features/about/lib/type'; import { AboutContent } from '@/features/about/ui/AboutContent'; import { AboutHero } from '@/features/about/ui/AboutHero'; import { PartnershipForm } from '@/features/about/ui/AboutPage'; +import { BASE_URL } from '@/shared/config/api/URLs'; import { Metadata } from 'next'; interface Props { params: { locale: 'uz' | 'ru' }; } -// Dynamic SEO uchun server-side API chaqiruvi export async function generateMetadata({ params }: Props): Promise { const { locale } = params; @@ -34,6 +34,10 @@ export async function generateMetadata({ params }: Props): Promise { ? banner.description_ru : banner.description_en; + const bannerUrl = banner.image + ? BASE_URL + banner.image + : '/logos/logo.png'; + return { title: title || 'Gastro Market', description: @@ -45,7 +49,7 @@ export async function generateMetadata({ params }: Props): Promise { siteName: 'GASTRO', images: [ { - url: banner.image ? '/' + banner.image : '/logos/logo.png', + url: bannerUrl, width: 1200, height: 1200, alt: title || 'Gastro Market', @@ -59,7 +63,7 @@ export async function generateMetadata({ params }: Props): Promise { title: title || 'Gastro Market', description: description || 'Gastro Market – gastronomiya va kulinariya olami', - images: [banner.image ? '/' + banner.image : '/logos/logo.png'], + images: [bannerUrl], }, }; } catch (err) {