This commit is contained in:
Samandar Turgunboyev
2026-02-26 13:28:33 +05:00
parent e7f0731353
commit edcaaaf961
2 changed files with 7 additions and 5 deletions

View File

@@ -12,6 +12,11 @@ function getImageUrl(image?: string | null): string {
return image.includes(BASE_URL) ? image : BASE_URL + image; return image.includes(BASE_URL) ? image : BASE_URL + image;
} }
const fetchAboutData = async () => {
const res = await partner_api.getAbout();
return res.data.banner;
};
interface Props { interface Props {
params: { locale: 'uz' | 'ru' }; params: { locale: 'uz' | 'ru' };
} }
@@ -20,8 +25,7 @@ export async function generateMetadata({ params }: Props): Promise<Metadata> {
const { locale } = params; const { locale } = params;
try { try {
const res = await partner_api.getAbout(); const banner = await fetchAboutData();
const banner = res.data.banner;
const title = const title =
locale === 'uz' locale === 'uz'

View File

@@ -10,9 +10,7 @@ export const partner_api = {
}, },
async getAbout(): Promise<AxiosResponse<AboutData>> { async getAbout(): Promise<AxiosResponse<AboutData>> {
const res = httpClient.get(API_URLS.About, { const res = httpClient.get(API_URLS.About);
headers: { 'Cache-Control': 'no-cache' },
});
return res; return res;
}, },
}; };