diff --git a/apps/web/src/app/main/home/components/HeroSection.tsx b/apps/web/src/app/main/home/components/HeroSection.tsx index 9dae829..5a58d12 100755 --- a/apps/web/src/app/main/home/components/HeroSection.tsx +++ b/apps/web/src/app/main/home/components/HeroSection.tsx @@ -10,6 +10,7 @@ import { EyeOutlined, } from "@ant-design/icons"; import type { CarouselRef } from "antd/es/carousel"; +import { useAppConfig } from "@nice/client"; const { Title, Text } = Typography; @@ -53,7 +54,7 @@ const platformStats: PlatformStat[] = [ const HeroSection = () => { const carouselRef = useRef(null); - + const handlePrev = useCallback(() => { carouselRef.current?.prev(); }, []); @@ -61,7 +62,7 @@ const HeroSection = () => { const handleNext = useCallback(() => { carouselRef.current?.next(); }, []); - + //const {slides:carouselItems} = useAppConfig() return (
@@ -73,24 +74,30 @@ const HeroSection = () => { dots={{ className: "carousel-dots !bottom-32 !z-20", }}> - {carouselItems.map((item, index) => ( -
-
-
-
+ {Array.isArray(carouselItems)? + (carouselItems.map((item, index) => ( +
+
+
+
- {/* Content Container */} -
-
- ))} + {/* Content Container */} +
+
+ ))) + :( +
+ ) + } {/* Navigation Buttons */}