ok
This commit is contained in:
@@ -182,7 +182,7 @@ const CoverflowCarousel = ({ products, onCardClick }) => {
|
|||||||
<div className={styles.cardWrapper}>
|
<div className={styles.cardWrapper}>
|
||||||
<ProductCard
|
<ProductCard
|
||||||
product={product}
|
product={product}
|
||||||
onCardClick={(p) => { onCardClick && onCardClick(p); }}
|
onCardClick={(p,d) => { onCardClick && onCardClick(p,d); }}
|
||||||
isCenter={position === 0}
|
isCenter={position === 0}
|
||||||
canHover={position === 0 && animationState === 'ready' && !shiftDirection && !isDragging}
|
canHover={position === 0 && animationState === 'ready' && !shiftDirection && !isDragging}
|
||||||
onCollapse={position === 0 ? collapseOverlay : undefined}
|
onCollapse={position === 0 ? collapseOverlay : undefined}
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ const ProductCard = ({ product, onCardClick, isCenter, canHover, onCollapse }) =
|
|||||||
<div className={styles.buttonGroup}>
|
<div className={styles.buttonGroup}>
|
||||||
<button
|
<button
|
||||||
className={styles.detailButton}
|
className={styles.detailButton}
|
||||||
onClick={(e) => { e.preventDefault(); e.stopPropagation(); onCardClick && onCardClick(product); }}
|
onClick={(e) => { e.preventDefault(); e.stopPropagation(); onCardClick && onCardClick(product, true); }}
|
||||||
>
|
>
|
||||||
Detail
|
Detail
|
||||||
</button>
|
</button>
|
||||||
|
|||||||
@@ -41,7 +41,12 @@ const ProductSection = ({ setSelectedProduct, setShowedModal, productSectionRef,
|
|||||||
}, [selectedCategory, products]);
|
}, [selectedCategory, products]);
|
||||||
|
|
||||||
// Handle product selection for detail view
|
// Handle product selection for detail view
|
||||||
const handleViewDetail = (product) => {
|
const handleViewDetail = (product, detailed) => {
|
||||||
|
if(detailed) {
|
||||||
|
setSelectedProduct(product);
|
||||||
|
setShowedModal('product');
|
||||||
|
return;
|
||||||
|
}
|
||||||
setSelectedProduct(product);
|
setSelectedProduct(product);
|
||||||
setShowedModal('product');
|
setShowedModal('product');
|
||||||
setWillDo('checkout');
|
setWillDo('checkout');
|
||||||
|
|||||||
Reference in New Issue
Block a user