import Link from 'next/link' import { useRouter } from 'next/router' import { IconChevronLeft } from 'ui' import * as NavItems from './NavigationMenu.constants' // @ts-expect-error import jsSpec from '~/../../spec/supabase_js_v2_temp_new_shape.yml' assert { type: 'yml' } // @ts-expect-error import clientLibsCommon from '~/../../spec/common-cli.yml' assert { type: 'yml' } const NavigationMenuCliList = ({ currentLevel, setLevel, id }) => { const router = useRouter() const menu = NavItems[id] let functions = jsSpec.functions functions = functions.map((func) => { let data = { ...func, } data = { ...data, ...clientLibsCommon.commands.filter((x) => { return x.id === func.id })[0], } return data }) const FunctionLink = ({ title, id, icon, }: { title: string name: string id: string icon?: string }) => { return (
  • {icon && } {title}
  • ) } const SideMenuTitle = ({ title }: { title: string }) => { return ( {title} ) } const Divider = () => { return
    } const MenuSections = [ { key: 'general', label: 'General', }, { key: 'secrets', label: 'Secrets', }, { key: 'projects', label: 'Projects', }, { key: 'organizations', label: 'Organizations', }, { key: 'migration', label: 'Migration', }, { key: 'database', label: 'Database', }, { key: 'completion', label: 'Completion', }, ] return (
    Back to reference

    {menu.title ?? currentLevel}

    {menu.extras && ( <> {' '} Resources )} {menu.extras?.map((x) => { return (
  • {x.icon && } {x.name}
  • ) })}
    ) } export default NavigationMenuCliList