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; }, };