diff --git a/frontend/application/components/ArchivePage.tsx b/frontend/application/components/ArchivePage.tsx index 2c9ae7f1..6b1ee6b4 100644 --- a/frontend/application/components/ArchivePage.tsx +++ b/frontend/application/components/ArchivePage.tsx @@ -160,15 +160,53 @@ const ArchiveProductCard: React.FC<{ product: Product }> = ({ product }) => { ))} -
- {product.price} - +
+ {product.price} + {(() => { + const cartItem = useCartStore.getState().items.find(i => i.product.id === product.id); + if (cartItem && cartItem.quantity > 0) { + return ( +
{ e.preventDefault(); e.stopPropagation(); }} + className="flex items-center gap-1 bg-canina-blue/10 border border-canina-blue/20 rounded-xl p-1" + > + + + {toPersian(cartItem.quantity)} + + +
+ ); + } + return ( + + ); + })()}
@@ -195,6 +233,7 @@ export default function ArchivePage({ const [activeSymptoms, setActiveSymptoms] = useState(initialSymptoms ? initialSymptoms.split(',') : []); const [searchQuery, setSearchQuery] = useState(initialSearch); const [isUpdating, setIsUpdating] = useState(false); + const [isMobileFilterOpen, setIsMobileFilterOpen] = useState(false); const [filteredProducts, setFilteredProducts] = useState([]); const [page, setPage] = useState(1); const [meta, setMeta] = useState({ total: 0, lastPage: 1 }); @@ -324,25 +363,36 @@ export default function ArchivePage({
- {/* Mobile Navigation & Breadcrumbs */} -
- + {/* Mobile Header & Filter Trigger */} +
+
+ +
+ +
+
-
+
router.push('/')}>کانینا - فروشگاه تخصصی + فروشگاه تخصصی ({meta.total || filteredProducts.length} محصول)
{/* Desktop Breadcrumbs */} -
+
router.push('/')}>خانه { setSelectedCategory("all"); }}>کاتالوگ @@ -354,14 +404,22 @@ export default function ArchivePage({ )}
-
+
- {/* Sidebar Filters */} -