diff --git a/src/app/home/page.tsx b/src/app/home/page.tsx index 78e11524..2a3e9440 100644 --- a/src/app/home/page.tsx +++ b/src/app/home/page.tsx @@ -9,6 +9,7 @@ import { getActiveProducts, salesAPI } from '@/services/api.service'; import type { Product } from '@/types/index'; import { PolarProduct } from '@/types/polar'; import { useAuth } from '@/context/auth-store'; +import { ShoppingCart } from 'lucide-react'; interface HomePageProps { tab?: string; @@ -154,7 +155,6 @@ const HomePage: React.FC = ({ const handleProductClick = (productUntyped: Product | PolarProduct) => { const product = productUntyped as Product; setSelectedProduct(product); - setIsDrawerOpen(true); setCartItems((prevCart) => { const pid = String(product.id); // stable local id for UI/cart identity const polarProductId = (product as any).polar_id || String(product.id); // original Polar ID for API calls @@ -263,6 +263,8 @@ const HomePage: React.FC = ({ setCartItems([]); }; + const totalItems = cartItems.length; + // Function to reload products const reloadProducts = async () => { try { @@ -346,22 +348,16 @@ const HomePage: React.FC = ({ loading={loading} /> -
-
-
+
+
+
-
+
= ({
+ + = ({ return ( <> -
- );