"use client"; import { useState } from "react"; import { useRouter } from "next/navigation"; import { api } from "./api"; type Col = { slug: string; title: string; description: string; published: boolean; items: { tool: string; blurb?: string | null }[] }; export function CollectionsEditor({ initial }: { initial: Col[] }) { const r = useRouter(); const [sel, setSel] = useState