- 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 (