"use client"; import { TbChevronDown } from "react-icons/tb"; import classNames from "classnames"; import { API_COLLECTIONS } from "@/utils/datas/api_collections"; import { Method } from "@/components/method"; import { ApiRoute } from "@/utils/type"; import Link from "next/link"; import { usePathname, useRouter } from "next/navigation"; export const EditorSidebar = ({ collections, onCollections, }: { collections: string[]; onCollections: (collections: string[]) => void; }) => { const pathname = usePathname(); const handleSetActiveCollection = (key: string) => { if (collections.includes(key)) { onCollections(collections.filter((col) => col !== key)); } else { onCollections([...collections, key]); } }; return (
{collection.key} API
{end.path}
))}