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;
}
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<Metadata> {
const { locale } = params;
try {
const res = await partner_api.getAbout();
const banner = res.data.banner;
const banner = await fetchAboutData();
const title =
locale === 'uz'

View File

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