"use client"; import { useState, useEffect } from "react"; import { generateZip, zipSizeForDate, ZipPuzzle } from "@/lib/generators/zip"; import { todayISO } from "@/lib/rng"; import ZipBoard from "@/components/ZipBoard"; import DailyPageShell from "@/components/DailyPageShell"; export default function ZipPage() { const date = todayISO(); const [puzzle, setPuzzle] = useState(null); useEffect(() => { setPuzzle(generateZip(date, zipSizeForDate(date))); }, [date]); const dateLabel = new Date(date + "T00:00:00").toLocaleDateString("fr-FR", { weekday: "long", day: "numeric", month: "long", }); return ( {puzzle ? ( ) : (
Chargement…
)}
); }