diff --git a/src/components/common/CarouselSection.tsx b/src/components/common/CarouselSection.tsx index 225c80f..e00917e 100644 --- a/src/components/common/CarouselSection.tsx +++ b/src/components/common/CarouselSection.tsx @@ -7,6 +7,7 @@ import useAnimateOnScroll from '@/hooks/useAnimateOnScroll.ts'; import { IImageContent } from '@/types/IImageContent.ts'; import getImageUrl from '@/utils/getImageUrl.ts'; import { fadeIn } from '@/styles/animation.ts'; +import { STATIC_DATA_API } from '@/constants'; const Section = styled.section` background-color: #b1dde6; @@ -112,6 +113,7 @@ interface CarouselSectionProps { title: string; subtitles?: string[]; imageContentsSections: IImageContent[][]; + useStaticDataApi?: boolean; } /** @@ -119,12 +121,14 @@ interface CarouselSectionProps { * @param title - Section title * @param subtitles - Section subtitles * @param imageContentsSections - Array of image content arrays + * @param useStaticDataApi - Flag to use static data api * @constructor CarouselSection - React Function Component */ const CarouselSection: React.FC = ({ title, subtitles: sectionSubtitle = [], imageContentsSections, + useStaticDataApi = false, }: CarouselSectionProps) => { const { ref, animate } = useAnimateOnScroll(); @@ -145,7 +149,11 @@ const CarouselSection: React.FC = ({ ))} diff --git a/src/pages/HomePage.tsx b/src/pages/HomePage.tsx index 5845bef..648af69 100644 --- a/src/pages/HomePage.tsx +++ b/src/pages/HomePage.tsx @@ -51,12 +51,14 @@ const HomePage = () => { ]; if (redstoneCollection) { - imageContentsSections.push(createSections(redstoneCollection, 'redstone')); + imageContentsSections.push( + createSections(redstoneCollection, 'redstoneCollection'), + ); } if (architectureCollection) { imageContentsSections.push( - createSections(architectureCollection, 'architecture'), + createSections(architectureCollection, 'architectureCollection'), ); } @@ -101,6 +103,7 @@ const HomePage = () => { t('home.carousel.subtitles', { returnObjects: true }) as string[] } imageContentsSections={imageContentsSections} + useStaticDataApi={true} /> );