added base_url iamge

This commit is contained in:
Samandar Turgunboyev
2026-02-26 12:28:42 +05:00
parent 18cfa5cdf9
commit 8aef5f8b18

View File

@@ -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<Metadata> {
const { locale } = params;
@@ -34,6 +34,10 @@ export async function generateMetadata({ params }: Props): Promise<Metadata> {
? 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<Metadata> {
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<Metadata> {
title: title || 'Gastro Market',
description:
description || 'Gastro Market gastronomiya va kulinariya olami',
images: [banner.image ? '/' + banner.image : '/logos/logo.png'],
images: [bannerUrl],
},
};
} catch (err) {