import { useState, useEffect } from 'react';
import { useCart } from '@store/cart';
import { ProductCard } from '@/components/ui';
export default function Storefront({ products }) {
const { addToCart } = useCart();
const [isLoaded, setIsLoaded] = useState(false);
useEffect(() => {
performance.mark('store-init');
setIsLoaded(true);
}, []);
const handleBuy = async (id) => {
await addToCart(id);
console.log('[Success] Added in 0.02s');
};
return (
<div className="grid gap-6 grid-cols-4">
{products.map((p) => (
<ProductCard key={p.id} data={p} onAdd={handleBuy} />
))}
</div>
);
}
import { useState, useEffect } from 'react';
import { useCart } from '@store/cart';
import { ProductCard } from '@/components/ui';
export default function Storefront({ products }) {
const { addToCart } = useCart();
const [isLoaded, setIsLoaded] = useState(false);
useEffect(() => {
performance.mark('store-init');
setIsLoaded(true);
}, []);
const handleBuy = async (id) => {
await addToCart(id);
console.log('[Success] Added in 0.02s');
};
return (
<div className="grid gap-6 grid-cols-4">
{products.map((p) => (
<ProductCard key={p.id} data={p} onAdd={handleBuy} />
))}
</div>
);
}Sites & Shops
Webflow
Shopify
Astro
Your website should be a sales machine, not a brochure. I build sites and shops that load instantly, are easy to edit, and designed to turn visitors into customers — no developer on call needed.





