diff --git a/src/app/[locale]/about/page.tsx b/src/app/[locale]/about/page.tsx index e874d5c..a8a87db 100644 --- a/src/app/[locale]/about/page.tsx +++ b/src/app/[locale]/about/page.tsx @@ -8,16 +8,15 @@ import { BASE_URL } from '@/shared/config/api/URLs'; import { Metadata } from 'next'; interface Props { - params: { locale: 'uz' | 'ru' }; + params: { locale: 'uz' | 'ru' | 'en' }; } export async function generateMetadata({ params }: Props): Promise { - const { locale } = params; + const { locale } = await params; // Next.js 15 da params async try { const res = await partner_api.getAbout(); const data: AboutData = res.data; - const banner = data.banner; const title = @@ -35,8 +34,10 @@ export async function generateMetadata({ params }: Props): Promise { : banner.description_en; const bannerUrl = banner.image - ? BASE_URL + banner.image + ? `${BASE_URL}${banner.image}` : '/logos/logo.png'; + const ogLocale = + locale === 'uz' ? 'uz_UZ' : locale === 'ru' ? 'ru_RU' : 'en_US'; return { title: title || 'Gastro Market', @@ -51,11 +52,11 @@ export async function generateMetadata({ params }: Props): Promise { { url: bannerUrl, width: 1200, - height: 1200, + height: 630, alt: title || 'Gastro Market', }, ], - locale: locale === 'uz' ? 'uz_UZ' : 'ru_RU', + locale: ogLocale, type: 'website', }, twitter: { @@ -75,11 +76,10 @@ export async function generateMetadata({ params }: Props): Promise { } } -// Page component -const page = async () => { +// ✅ Page ham params olishi kerak +const AboutPage = async () => { return (
- {/* Hero va Content ichida React Query ishlatilgan loading + dynamic data */} @@ -87,4 +87,4 @@ const page = async () => { ); }; -export default page; +export default AboutPage;