diff --git a/src/app/_Home/components/Owners.tsx b/src/app/_Home/components/Owners.tsx index df2f124..a3b2bbf 100644 --- a/src/app/_Home/components/Owners.tsx +++ b/src/app/_Home/components/Owners.tsx @@ -12,8 +12,9 @@ const Owners = () => { Revolution?

- Discover the story, vision, and passion that drive Himspired to - redefine fashion for a new era. + Discover the story, vision, and passion that drive{" "} + Himspired to redefine + fashion for a new era.

diff --git a/src/app/_Home/components/Products.tsx b/src/app/_Home/components/Products.tsx index b1320d4..93f2990 100644 --- a/src/app/_Home/components/Products.tsx +++ b/src/app/_Home/components/Products.tsx @@ -8,7 +8,12 @@ import { CarouselItem, type CarouselApi, } from "@/components/ui/carousel"; -import { ChevronLeft, ChevronRight } from "lucide-react"; +import { + ArrowRight, + ChevronLeft, + ChevronRight, + ChevronsUp, +} from "lucide-react"; import { cn } from "@/lib/utils"; import { colors } from "@/constants/colors"; import ProductSection from "./products/components/ProductSection"; @@ -21,7 +26,8 @@ import { import { useClothesByCategory } from "@/sanity/queries"; import React from "react"; import ProductCardSkeleton from "@/components/common/skeleton/product-card-skeleton.component"; - +import Wrapper from "@/components/layout/Wrapper"; +import Link from "next/link"; // Define our sections with their components and data const SECTIONS = [ @@ -59,15 +65,14 @@ const Products = () => { // const { clothes, loading, error, refetch } = useClothes(); const { clothesByCategory, loading } = useClothesByCategory(8); - - - // Calculate items to show based on screen width useEffect(() => { const updateItemsToShow = () => { const width = window.innerWidth; - if (width >= 1280) setItemsToShow(4); // XL and 2XL - else if (width >= 768) setItemsToShow(3); // MD + if (width >= 1280) + setItemsToShow(4); // XL and 2XL + else if (width >= 768) + setItemsToShow(3); // MD else setItemsToShow(2); // SM }; @@ -120,7 +125,7 @@ const Products = () => { if (!isHovering) { autoplayRef.current = setTimeout(() => { // Check if we're at the last slide - const isLastSlide = current === SECTIONS.length - 1; + const isLastSlide = current === clothesByCategory.length - 1; if (isLastSlide) { // Go back to the first slide @@ -155,170 +160,256 @@ const Products = () => { // Check if we're at the first or last slide const isFirstSlide = current === 0; - const isLastSlide = current === SECTIONS.length - 1; - if (loading && clothesByCategory.length === 0) { - return (
- {Array.from({ length: 4 }).map((_, i) => )} -
- ) - } + const isLastSlide = current === clothesByCategory.length - 1; + // if (loading && clothesByCategory.length === 0) { + // return (
+ // {Array.from({ length: 4 }).map((_, i) => )} + //
+ // ) + // } return ( -
setIsHovering(true)} - onMouseLeave={() => setIsHovering(false)} - > - {" "} - {/* Section indicator - with enhanced animation */} -
- - +
setIsHovering(true)} + onMouseLeave={() => setIsHovering(false)} + > + {/* Section indicator - with enhanced animation */} +
+ + + {current + 1} / + + {clothesByCategory[current]?.category} + + + +
+ {/* Carousel */} +
+ - - {current + 1} /{" "} - - - {clothesByCategory[current]?.category} - - - -
- {/* Carousel */} -
- - - {clothesByCategory.map((section) => ( - - -
- -
-
-
- ))} -
+ + {clothesByCategory.map((section) => ( + + +
+ +
+
+
+ ))} +
- {/* Custom navigation arrows - disabled when at first/last slide */} - - api && api.scrollPrev()} - className={cn( - "rounded-full p-3 shadow-lg transition-all duration-300 backdrop-blur-sm group", - isFirstSlide - ? "bg-gray-200/80 cursor-not-allowed" - : "bg-white/80 hover:bg-[#68191E]" - )} - disabled={isFirstSlide} - aria-label="Previous section" - whileHover={!isFirstSlide ? { scale: 1.1 } : undefined} - whileTap={!isFirstSlide ? { scale: 0.95 } : undefined} + {/* Custom navigation arrows - disabled when at first/last slide */} + - api && api.scrollPrev()} className={cn( - "h-6 w-6 transition-colors duration-300", + "rounded-full p-3 shadow-lg transition-all duration-300 backdrop-blur-sm group", isFirstSlide - ? "text-gray-400" - : "text-gray-800 group-hover:text-white" + ? "bg-gray-200/80 cursor-not-allowed" + : "bg-white/80 hover:bg-[#68191E]" )} - /> - - + disabled={isFirstSlide} + aria-label="Previous section" + whileHover={!isFirstSlide ? { scale: 1.1 } : undefined} + whileTap={!isFirstSlide ? { scale: 0.95 } : undefined} + > + + + - - api && api.scrollNext()} - className={cn( - "rounded-full p-3 shadow-lg transition-all duration-300 backdrop-blur-sm group", - isLastSlide - ? "bg-gray-200/80 cursor-not-allowed" - : "bg-white/80 hover:bg-[#68191E]" - )} - disabled={isLastSlide} - aria-label="Next section" - whileHover={!isLastSlide ? { scale: 1.1 } : undefined} - whileTap={!isLastSlide ? { scale: 0.95 } : undefined} + - api && api.scrollNext()} className={cn( - "h-6 w-6 transition-colors duration-300", + "rounded-full p-3 shadow-lg transition-all duration-300 backdrop-blur-sm group", isLastSlide - ? "text-gray-400" - : "text-gray-800 group-hover:text-white" + ? "bg-gray-200/80 cursor-not-allowed" + : "bg-white/80 hover:bg-[#68191E]" )} + disabled={isLastSlide} + aria-label="Next section" + whileHover={!isLastSlide ? { scale: 1.1 } : undefined} + whileTap={!isLastSlide ? { scale: 0.95 } : undefined} + > + + + +
+ + {/* Navigation dots with animation */} + + {clothesByCategory.map((section, index) => ( + goToSlide(index)} + aria-label={`Go to ${section.category}`} + whileHover={{ scale: 1.2 }} + whileTap={{ scale: 0.9 }} /> - + ))} - - - {/* Navigation dots with animation */} - {" "} + {/* Animated Footer Section */} + - {clothesByCategory.map((section, index) => ( - + goToSlide(index)} - aria-label={`Go to ${section.category}`} - whileHover={{ scale: 1.2 }} - whileTap={{ scale: 0.9 }} - /> - ))} + > + + + + SWIPE UP + + + + {/* Shop Now Button */} + + + + + SHOP NOW + + + + + + +
-
+ ); }; diff --git a/src/app/_Home/components/products/components/ProductSection.tsx b/src/app/_Home/components/products/components/ProductSection.tsx index 29baec6..3ce6fda 100644 --- a/src/app/_Home/components/products/components/ProductSection.tsx +++ b/src/app/_Home/components/products/components/ProductSection.tsx @@ -206,15 +206,17 @@ const ProductItem = ({

)} - - {showSizes && ( - +
+ + {showSizes && ( + {product.size?.map((sizeOption) => { const sizeCartQuantity = sizeQuantities[sizeOption] || 0; @@ -246,6 +248,7 @@ const ProductItem = ({ )} +
) } diff --git a/src/components/layout/Wrapper.tsx b/src/components/layout/Wrapper.tsx index 2cdabe0..684427e 100644 --- a/src/components/layout/Wrapper.tsx +++ b/src/components/layout/Wrapper.tsx @@ -6,7 +6,7 @@ interface WrapperProps { } const Wrapper: React.FC = ({ children, className = "" }) => { - return
{children}
; + return
{children}
; }; export default Wrapper;