фикс билда

This commit is contained in:
ifraimka1 committed 2025-05-15 18:33:37 +03:00
1 parent 759d9edb31
commit 2a5c730abf
3 files changed
+12 -5

No files matched your search

+10 -3
View File
@@ -6,8 +6,8 @@ export interface MediaItem {
src: string; src: string;
category: string; category: string;
name: string; name: string;
team_name: string; team_name?: string;
team_job: string; team_job?: string;
} }
function decodeHtml(html: string) { function decodeHtml(html: string) {
@@ -34,7 +34,14 @@ export const fetchMedia = async (): Promise<MediaItem[]> => {
const transformedMedia = media.map(({ id, source_url, alt_text, caption, title }) => { const transformedMedia = media.map(({ id, source_url, alt_text, caption, title }) => {
const [category = "uncategorized", name = "unknown"] = const [category = "uncategorized", name = "unknown"] =
alt_text?.split("_") || []; alt_text?.split("_") || [];
return { id, src: source_url, category, name, team_name: title.rendered, team_job: decodeHtml(caption.rendered)}; const newItem: MediaItem = { id, src: source_url, category, name };
if (category === "team") {
newItem.team_name = title.rendered;
newItem.team_job = decodeHtml(caption.rendered);
}
return newItem;
}); });
allMedia = [...allMedia, ...transformedMedia]; allMedia = [...allMedia, ...transformedMedia];
+1 -1
View File
@@ -16,7 +16,7 @@ interface SliderProps {
autoPlay?: boolean; autoPlay?: boolean;
autoPlayTime?: number; autoPlayTime?: number;
images?: string[]; images?: string[];
category: string; category?: string;
customPerSlide?: number; customPerSlide?: number;
} }
+1 -1
View File
@@ -1 +1 @@
{"root":["./src/main.tsx","./src/vite-env.d.ts","./src/app/app.tsx","./src/app/layout/root.tsx","./src/app/providers/router/index.ts","./src/app/providers/router/ui/approuter.tsx","./src/app/types/global.d.ts","./src/modules/index.ts","./src/modules/contact/api/post.ts","./src/modules/contact/hooks/usecontactform.ts","./src/modules/media/api/get.ts","./src/modules/media/hooks/usemedia.ts","./src/modules/news/api/get.ts","./src/modules/news/hooks/usenews.ts","./src/modules/news/hooks/usenewsbyid.ts","./src/modules/posts/api/get/fetchpostbyid.ts","./src/modules/posts/api/get/fetchpostprojects.ts","./src/modules/posts/api/get/fetchposts.ts","./src/modules/posts/hooks/usepostbyid.ts","./src/modules/posts/hooks/usepostprojects.ts","./src/modules/posts/hooks/useposts.ts","./src/pages/aboutus/aboutus.tsx","./src/pages/aboutus/index.ts","./src/pages/aboutus/types.ts","./src/pages/contact/contact.tsx","./src/pages/contact/index.ts","./src/pages/mainpage/index.tsx","./src/pages/mainpage/ui/mainpage/mainpage.async.tsx","./src/pages/mainpage/ui/mainpage/mainpage.tsx","./src/pages/mainpage/ui/mainpage/mockdata.ts","./src/pages/mainpage/ui/components/gallery/gallery.tsx","./src/pages/mainpage/ui/components/gallery/index.ts","./src/pages/newsitem/newsitem.tsx","./src/pages/notfound/notfoundpage.tsx","./src/pages/wppostpage/wppostpage.tsx","./src/shared/components/card/card.tsx","./src/shared/components/card/types.ts","./src/shared/components/field/field.tsx","./src/shared/components/field/index.ts","./src/shared/api/parsecontent.ts","./src/shared/api/wp-client.ts","./src/shared/assets/images/index.ts","./src/shared/assets/images/numbers/index.ts","./src/shared/config/routeconfig/routeconfig.tsx","./src/shared/lib/elementonscreen/elementonscreen.ts","./src/shared/lib/classnames/classnames.ts","./src/shared/types/app.d.ts","./src/widgets/button/ui/button.tsx","./src/widgets/cardlist/cardlist.tsx","./src/widgets/cardlist/cardlistfunctions.ts","./src/widgets/cardlist/cardlisttemplate.tsx","./src/widgets/cardlist/types.ts","./src/widgets/categorypage/categorypage.tsx","./src/widgets/contactform/contactform.tsx","./src/widgets/contactform/index.ts","./src/widgets/contactform/variables.ts","./src/widgets/contactus/contactus.tsx","./src/widgets/contactus/index.ts","./src/widgets/footer/footer.tsx","./src/widgets/footer/footercontacts.tsx","./src/widgets/footer/footerlink.tsx","./src/widgets/footer/index.ts","./src/widgets/mediablock/mediablock.tsx","./src/widgets/mediablock/index.ts","./src/widgets/mediablock/mediacontainer/mediacontainer.tsx","./src/widgets/mediablock/mediacontainer/index.ts","./src/widgets/navbar/navbar.tsx","./src/widgets/navbar/navbarlink.tsx","./src/widgets/navbar/index.ts","./src/widgets/numbers/numbers.tsx","./src/widgets/numbers/index.ts","./src/widgets/partners/partners.tsx","./src/widgets/partners/partnerslogo.tsx","./src/widgets/partners/index.ts","./src/widgets/photogallery/photogallery.tsx","./src/widgets/photogallery/index.ts","./src/widgets/slider/slider.tsx","./src/widgets/slider/components/arrows.tsx","./src/widgets/slider/components/dot.tsx","./src/widgets/slider/components/dots.tsx","./src/widgets/slider/components/slide.tsx","./src/widgets/slider/components/slideslist.tsx","./src/widgets/team/team.tsx","./src/widgets/team/index.ts","./src/widgets/wppost/pagecontent.tsx","./src/widgets/wppost/pageheader.tsx","./src/widgets/wppost/wppost.tsx","./src/widgets/wppost/index.ts"],"version":"5.8.3"} {"root":["./src/main.tsx","./src/vite-env.d.ts","./src/app/app.tsx","./src/app/layout/root.tsx","./src/app/providers/router/index.ts","./src/app/providers/router/ui/approuter.tsx","./src/app/types/global.d.ts","./src/modules/index.ts","./src/modules/contact/api/post.ts","./src/modules/contact/hooks/usecontactform.ts","./src/modules/media/api/get.ts","./src/modules/media/hooks/usemedia.ts","./src/modules/news/api/get.ts","./src/modules/news/hooks/usenews.ts","./src/modules/news/hooks/usenewsbyid.ts","./src/modules/posts/api/get/fetchpostbyid.ts","./src/modules/posts/api/get/fetchpostprojects.ts","./src/modules/posts/api/get/fetchposts.ts","./src/modules/posts/hooks/usepostbyid.ts","./src/modules/posts/hooks/usepostprojects.ts","./src/modules/posts/hooks/useposts.ts","./src/pages/aboutus/aboutus.tsx","./src/pages/aboutus/index.ts","./src/pages/aboutus/types.ts","./src/pages/contact/contact.tsx","./src/pages/contact/index.ts","./src/pages/mainpage/index.tsx","./src/pages/mainpage/ui/mainpage/mainpage.async.tsx","./src/pages/mainpage/ui/mainpage/mainpage.tsx","./src/pages/mainpage/ui/mainpage/mockdata.ts","./src/pages/mainpage/ui/components/gallery/gallery.tsx","./src/pages/mainpage/ui/components/gallery/index.ts","./src/pages/newsitem/newsitem.tsx","./src/pages/notfound/notfoundpage.tsx","./src/pages/wppostpage/wppostpage.tsx","./src/shared/components/card/card.tsx","./src/shared/components/card/types.ts","./src/shared/components/field/field.tsx","./src/shared/components/field/index.ts","./src/shared/components/skeleton/skeletoncard.tsx","./src/shared/components/skeleton/skeletongrid.tsx","./src/shared/components/skeletongallery/skeletongallery.tsx","./src/shared/components/skeletongrid/skeletoncard.tsx","./src/shared/components/skeletongrid/skeletongrid.tsx","./src/shared/components/skeletonpost/skeletonpost.tsx","./src/shared/components/skeletonslider/skeletonslider.tsx","./src/shared/components/withloading/withloading.tsx","./src/shared/api/parsecontent.ts","./src/shared/api/wp-client.ts","./src/shared/assets/images/index.ts","./src/shared/assets/images/numbers/index.ts","./src/shared/config/routeconfig/routeconfig.tsx","./src/shared/lib/elementonscreen/elementonscreen.ts","./src/shared/lib/resizeobserver/resizeobserver.ts","./src/shared/lib/classnames/classnames.ts","./src/shared/types/app.d.ts","./src/widgets/button/ui/button.tsx","./src/widgets/cardlist/cardlist.tsx","./src/widgets/cardlist/cardlistfunctions.ts","./src/widgets/cardlist/cardlisttemplate.tsx","./src/widgets/cardlist/types.ts","./src/widgets/categorypage/categorypage.tsx","./src/widgets/contactform/contactform.tsx","./src/widgets/contactform/index.ts","./src/widgets/contactform/variables.ts","./src/widgets/contactus/contactus.tsx","./src/widgets/contactus/index.ts","./src/widgets/footer/footer.tsx","./src/widgets/footer/footercontacts.tsx","./src/widgets/footer/footerlink.tsx","./src/widgets/footer/index.ts","./src/widgets/mediablock/mediablock.tsx","./src/widgets/mediablock/index.ts","./src/widgets/mediablock/mediacontainer/mediacontainer.tsx","./src/widgets/mediablock/mediacontainer/index.ts","./src/widgets/navbar/navbar.tsx","./src/widgets/navbar/navbarlink.tsx","./src/widgets/navbar/index.ts","./src/widgets/numbers/numbers.tsx","./src/widgets/numbers/index.ts","./src/widgets/partners/partners.tsx","./src/widgets/partners/partnerslogo.tsx","./src/widgets/partners/index.ts","./src/widgets/photogallery/photogallery.tsx","./src/widgets/photogallery/index.ts","./src/widgets/slider/slider.tsx","./src/widgets/slider/components/arrows.tsx","./src/widgets/slider/components/dot.tsx","./src/widgets/slider/components/dots.tsx","./src/widgets/slider/components/slide.tsx","./src/widgets/slider/components/slideslist.tsx","./src/widgets/team/team.tsx","./src/widgets/team/index.ts","./src/widgets/wppost/pagecontent.tsx","./src/widgets/wppost/pageheader.tsx","./src/widgets/wppost/wppost.tsx","./src/widgets/wppost/index.ts"],"version":"5.8.3"}