"use client"; import Link from "next/link"; import { useMemo } from "react"; import { useDerived, useSnap } from "@/lib/client"; import { Panel } from "@/components/portal"; import { monthEndView } from "@/lib/today"; const ACCENT = "var(--color-accent-700)"; type Box = "open" | "flag" | "done" | "wait"; function Row({ box, first, children, state }: { box: Box; first?: boolean; children: React.ReactNode; state: React.ReactNode }) { const border = box === "flag" ? "#ec3013" : box === "wait" ? "#b5b1af" : "#201e1d"; return (
  • ); } export default function MonthEndPanel() { const { s } = useSnap(); const { L, byId, staffById } = useDerived(); const m = useMemo(() => monthEndView(s, L, byId, staffById), [s, L, byId, staffById]); return ( {m.daysLeft} day{m.daysLeft === 1 ? "" : "s"} left} foot={Month-end pack} > ); }