From edcaaaf9613f407da3b27543d42b9031f6fa9830 Mon Sep 17 00:00:00 2001 From: Samandar Turgunboyev Date: Thu, 26 Feb 2026 13:28:33 +0500 Subject: [PATCH] fix --- src/app/[locale]/about/page.tsx | 8 ++++++-- src/features/about/lib/api.ts | 4 +--- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/src/app/[locale]/about/page.tsx b/src/app/[locale]/about/page.tsx index 6530d7d..afee07e 100644 --- a/src/app/[locale]/about/page.tsx +++ b/src/app/[locale]/about/page.tsx @@ -12,6 +12,11 @@ function getImageUrl(image?: string | null): string { return image.includes(BASE_URL) ? image : BASE_URL + image; } +const fetchAboutData = async () => { + const res = await partner_api.getAbout(); + return res.data.banner; +}; + interface Props { params: { locale: 'uz' | 'ru' }; } @@ -20,8 +25,7 @@ export async function generateMetadata({ params }: Props): Promise { const { locale } = params; try { - const res = await partner_api.getAbout(); - const banner = res.data.banner; + const banner = await fetchAboutData(); const title = locale === 'uz' diff --git a/src/features/about/lib/api.ts b/src/features/about/lib/api.ts index 53e9b42..3f4799c 100644 --- a/src/features/about/lib/api.ts +++ b/src/features/about/lib/api.ts @@ -10,9 +10,7 @@ export const partner_api = { }, async getAbout(): Promise> { - const res = httpClient.get(API_URLS.About, { - headers: { 'Cache-Control': 'no-cache' }, - }); + const res = httpClient.get(API_URLS.About); return res; }, };