"use client" import { useState } from "react" import { Button } from "@/components/ui/button" import { Input } from "@/components/ui/input" import { Sprout } from "lucide-react" const LISTMONK_URL = "https://newsletter.jeffemmett.com" const LIST_UUID = "d076325f-f39a-44a2-874d-2026c7eb6d1c" // MycoFi list export function NewsletterSignup() { const [email, setEmail] = useState("") const [status, setStatus] = useState<"idle" | "loading" | "success" | "error">("idle") const [message, setMessage] = useState("") const handleSubmit = async (e: React.FormEvent) => { e.preventDefault() if (!email) return setStatus("loading") try { const response = await fetch(`${LISTMONK_URL}/api/public/subscription`, { method: "POST", headers: { "Content-Type": "application/json", }, body: JSON.stringify({ email: email, list_uuids: [LIST_UUID], name: "", }), }) if (response.ok) { setStatus("success") setMessage("Merge in to the mesh.") setEmail("") } else { throw new Error("Subscription failed") } } catch { setStatus("error") setMessage("Something went wrong. Please try again.") } } return (
Stay Connected

Join the Mycelial Network

Subscribe for updates on regenerative economics, mycoeconomics research, and building regenerative futures.

{status === "success" ? (
{message}
) : (
setEmail(e.target.value)} required className="flex-1" />
)} {status === "error" && (

{message}

)}

No spam, unsubscribe anytime. We respect your privacy.

) }