"use client"; /* Everything else the app does. * * There used to be an "On the desktop" section here listing five things the phone couldn't do — * greyed out, untappable, and so just a list of disappointments in the middle of a menu. A menu * should be things you can do. The catalogue moved onto the phone rather than staying on that * list; the rest are simply not advertised here any more. */ import { useMemo } from "react"; import { useSnap } from "@/lib/client"; import { OPEN_STATUSES } from "@/lib/compute"; import { MBody, MNav, MRow, MRule, MSection, MTop } from "@/components/m"; export default function MMore() { const { s } = useSnap(); const activeItems = useMemo(() => s.catalog.filter((i) => !i.archived).length, [s.catalog]); const counts = useMemo(() => { const waiting = s.pickups.filter((p) => !p.pickedUp).length; const incoming = s.orders.filter((o) => OPEN_STATUSES.includes(o.status) && o.status !== "Draft").length; const rounds = s.pickups.filter((p) => !p.pickedUp && p.deliveredTo).length; return { waiting, incoming, rounds }; }, [s]); return ( <> 0} title="Pickup call list" sub={counts.waiting ? `${counts.waiting} waiting to be collected` : "Nobody waiting"} /> ); }