diff --git a/src/components/home/BeforeAfterGallery.tsx b/src/components/home/BeforeAfterGallery.tsx index 5055fcf..e902b10 100644 --- a/src/components/home/BeforeAfterGallery.tsx +++ b/src/components/home/BeforeAfterGallery.tsx @@ -13,9 +13,18 @@ const results = [ rating: 5, reviewCount: 2847, }, + { + id: 2, + name: "Skin Radiance Transformation", + beforeImg: "https://minio-api.nodecrew.me/saleor/marketing/use_case_3.webp", + afterImg: "https://minio-api.nodecrew.me/saleor/marketing/use_case_3_1.webp", + timeline: "6-8 Weeks", + rating: 5, + reviewCount: 1856, + }, ]; -export default function BeforeAfterGallery() { +function BeforeAfterSlider({ result }: { result: typeof results[0] }) { const [sliderPosition, setSliderPosition] = useState(50); const containerRef = useRef(null); @@ -33,6 +42,89 @@ export default function BeforeAfterGallery() { setSliderPosition(Math.max(0, Math.min(100, x))); }; + return ( +
+ {/* Before/After Slider */} +
+ {/* After Image */} + After - Smooth skin + + {/* Before Image (clipped) */} +
+ Before - Wrinkled skin +
+ + {/* Slider Handle */} +
+
+ + + +
+
+ + {/* Labels */} +
+ BEFORE +
+
+ AFTER +
+
+ + {/* Timeline and Rating */} +
+
+ + + + {result.timeline} +
+ +
+
+ {[1, 2, 3, 4, 5].map((star) => ( + + + + ))} +
+ ({result.reviewCount.toLocaleString()}) +
+
+ + {/* Verified Badge */} +
+ + + + Verified +
+
+ ); +} + +export default function BeforeAfterGallery() { return (
@@ -51,119 +143,37 @@ export default function BeforeAfterGallery() { -
- {/* Before/After Slider */} - - {/* After Image (full width, underneath) */} - After - Smooth skin - - {/* Before Image (clipped) */} -
+ {results.map((result, index) => ( + - Before - Wrinkled skin -
- - {/* Slider Handle */} -
- {/* Handle Circle */} -
- - - -
-
- - {/* Before Label */} -
- BEFORE -
- - {/* After Label */} -
- AFTER -
-
- - {/* Timeline and Rating */} - -
- - - - {results[0].timeline} -
- -
-
- {[1, 2, 3, 4, 5].map((star) => ( - - - - ))} -
- ({results[0].reviewCount.toLocaleString()} reviews) -
-
- - {/* Verified Results Badge */} - - - - - Verified Results - - - {/* CTA */} - - - Start Your Transformation - - + + + ))}
+ + {/* CTA */} + + + Start Your Transformation + +
);