import Link from "next/link"; interface Product { slug: string; name: string; description: string; category: string; product_type: string; image_url: string; base_price: number; } async function getProducts(): Promise { try { const res = await fetch( `${process.env.NEXT_PUBLIC_API_URL || "http://localhost:8000/api"}/products`, { next: { revalidate: 60 } } // Revalidate every minute ); if (!res.ok) return []; return res.json(); } catch { return []; } } export default async function HomePage() { const products = await getProducts(); return (

Mycopunk Swag Store

Mycelial merchandise for the decentralized future. Stickers, shirts, and more featuring designs from the mycopunk movement.

Browse Products Design Your Own

Featured Products

{products.length === 0 ? (

No products available yet. Check back soon!

) : (
{products.map((product) => (
{product.name}

{product.name}

{product.product_type}

${product.base_price.toFixed(2)}

))}
)}
); }