"use client"; import { useEffect, useState } from "react"; import { TOGETHER_LINK } from "@/lib/utils"; export function LandingHero() { const [pagesLast24h, setPagesLast24h] = useState(null); useEffect(() => { let cancelled = false; fetch("/api/stats") .then((res) => (res.ok ? res.json() : null)) .then((data) => { if (!cancelled && data && typeof data.pagesLast24h === "number") { setPagesLast24h(data.pagesLast24h); } }) .catch(() => {}); return () => { cancelled = true; }; }, []); const roundedCount = pagesLast24h !== null && pagesLast24h >= 10 ? Math.floor(pagesLast24h / 10) * 10 : null; return (
Powered by

Create stunning{" "} comics

Describe your scene, choose a style, and let AI render professional comic panels instantly.

{roundedCount !== null && (

More than{" "} {roundedCount.toLocaleString()} {" "} comic pages have been generated in the last 24 hours.

)}
); }