From 5d154806bcbbf374c4b46533804957bb5086a0cd Mon Sep 17 00:00:00 2001 From: bender Date: Fri, 6 Mar 2026 21:38:28 +0000 Subject: [PATCH 1/3] Update src/components/cardStack/CardStack.tsx --- src/components/cardStack/CardStack.tsx | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/components/cardStack/CardStack.tsx b/src/components/cardStack/CardStack.tsx index 625186b..045fec6 100644 --- a/src/components/cardStack/CardStack.tsx +++ b/src/components/cardStack/CardStack.tsx @@ -15,6 +15,12 @@ interface CardStackProps { useInvertedBackground?: boolean; ariaLabel?: string; className?: string; + gridVariant?: string; + uniformGridCustomHeightClasses?: string; + carouselThreshold?: number; + carouselMode?: "auto" | "buttons"; + carouselItemClassName?: string; + mode?: "auto" | "buttons"; } export const CardStack: React.FC = ({ @@ -25,7 +31,8 @@ export const CardStack: React.FC = ({ tag, tagIcon: TagIcon, textboxLayout = "default", animationType = "slide-up", useInvertedBackground = false, - ariaLabel = "Card stack section", className = ""}) => { + ariaLabel = "Card stack section", className = "", gridVariant = "", uniformGridCustomHeightClasses = "", carouselThreshold = 5, + carouselMode = "buttons"}) => { const [currentIndex, setCurrentIndex] = useState(0); return ( -- 2.49.1 From fdda2fc71469c8978b4801ec2cd8db26d7fc191e Mon Sep 17 00:00:00 2001 From: bender Date: Fri, 6 Mar 2026 21:38:29 +0000 Subject: [PATCH 2/3] Update src/components/cardStack/hooks/useCardAnimation.ts --- .../cardStack/hooks/useCardAnimation.ts | 23 +++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/src/components/cardStack/hooks/useCardAnimation.ts b/src/components/cardStack/hooks/useCardAnimation.ts index ec30084..2c3b486 100644 --- a/src/components/cardStack/hooks/useCardAnimation.ts +++ b/src/components/cardStack/hooks/useCardAnimation.ts @@ -1,12 +1,31 @@ -import { useEffect, useState } from "react"; +import { useEffect, useRef, useState } from "react"; export function useCardAnimation() { const [mounted, setMounted] = useState(false); const isMobile = typeof window !== "undefined" && window.innerWidth < 768; + const itemRefs = useRef<(HTMLElement | null)[]>([]); + const bottomContentRef = useRef(null); + const containerRef = useRef(null); + const perspectiveRef = useRef(null); useEffect(() => { setMounted(true); }, []); - return { mounted, isMobile }; + const setItemRef = (index: number, el: HTMLElement | null) => { + if (!itemRefs.current) { + itemRefs.current = []; + } + itemRefs.current[index] = el; + }; + + return { + mounted, + isMobile, + itemRefs, + setItemRef, + bottomContentRef, + containerRef, + perspectiveRef, + }; } -- 2.49.1 From a2ec4453cd87ca40b570d02add271a2dd4fd355b Mon Sep 17 00:00:00 2001 From: bender Date: Fri, 6 Mar 2026 21:38:29 +0000 Subject: [PATCH 3/3] Update src/lib/api/product.ts --- src/lib/api/product.ts | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/src/lib/api/product.ts b/src/lib/api/product.ts index 232d5a4..73e878b 100644 --- a/src/lib/api/product.ts +++ b/src/lib/api/product.ts @@ -4,6 +4,23 @@ export interface Product { price: string; imageSrc: string; imageAlt?: string; + rating?: number; + reviewCount?: number; + brand?: string; +} + +export interface ProductCard { + id: string; + name: string; + price: string; + imageSrc: string; + imageAlt?: string; + onFavorite?: () => void; + isFavorited?: boolean; + onProductClick?: () => void; + rating?: number; + reviewCount?: number; + brand?: string; } export async function fetchProduct(id: string) { -- 2.49.1