added base_url iamge
This commit is contained in:
@@ -4,13 +4,13 @@ import { AboutData } from '@/features/about/lib/type';
|
|||||||
import { AboutContent } from '@/features/about/ui/AboutContent';
|
import { AboutContent } from '@/features/about/ui/AboutContent';
|
||||||
import { AboutHero } from '@/features/about/ui/AboutHero';
|
import { AboutHero } from '@/features/about/ui/AboutHero';
|
||||||
import { PartnershipForm } from '@/features/about/ui/AboutPage';
|
import { PartnershipForm } from '@/features/about/ui/AboutPage';
|
||||||
|
import { BASE_URL } from '@/shared/config/api/URLs';
|
||||||
import { Metadata } from 'next';
|
import { Metadata } from 'next';
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
params: { locale: 'uz' | 'ru' };
|
params: { locale: 'uz' | 'ru' };
|
||||||
}
|
}
|
||||||
|
|
||||||
// Dynamic SEO uchun server-side API chaqiruvi
|
|
||||||
export async function generateMetadata({ params }: Props): Promise<Metadata> {
|
export async function generateMetadata({ params }: Props): Promise<Metadata> {
|
||||||
const { locale } = params;
|
const { locale } = params;
|
||||||
|
|
||||||
@@ -34,6 +34,10 @@ export async function generateMetadata({ params }: Props): Promise<Metadata> {
|
|||||||
? banner.description_ru
|
? banner.description_ru
|
||||||
: banner.description_en;
|
: banner.description_en;
|
||||||
|
|
||||||
|
const bannerUrl = banner.image
|
||||||
|
? BASE_URL + banner.image
|
||||||
|
: '/logos/logo.png';
|
||||||
|
|
||||||
return {
|
return {
|
||||||
title: title || 'Gastro Market',
|
title: title || 'Gastro Market',
|
||||||
description:
|
description:
|
||||||
@@ -45,7 +49,7 @@ export async function generateMetadata({ params }: Props): Promise<Metadata> {
|
|||||||
siteName: 'GASTRO',
|
siteName: 'GASTRO',
|
||||||
images: [
|
images: [
|
||||||
{
|
{
|
||||||
url: banner.image ? '/' + banner.image : '/logos/logo.png',
|
url: bannerUrl,
|
||||||
width: 1200,
|
width: 1200,
|
||||||
height: 1200,
|
height: 1200,
|
||||||
alt: title || 'Gastro Market',
|
alt: title || 'Gastro Market',
|
||||||
@@ -59,7 +63,7 @@ export async function generateMetadata({ params }: Props): Promise<Metadata> {
|
|||||||
title: title || 'Gastro Market',
|
title: title || 'Gastro Market',
|
||||||
description:
|
description:
|
||||||
description || 'Gastro Market – gastronomiya va kulinariya olami',
|
description || 'Gastro Market – gastronomiya va kulinariya olami',
|
||||||
images: [banner.image ? '/' + banner.image : '/logos/logo.png'],
|
images: [bannerUrl],
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
|
|||||||
Reference in New Issue
Block a user