'use client'; import Link from 'next/link.js'; import { useState } from 'react'; import { useThemeContext } from '../theme'; import { Doc, DocsStructure } from '../types/types.js'; import styles from './SideBar.module.css'; function TreeNode({ doc }: { doc: Doc }) { const [isExpanded, setIsExpanded] = useState(true); const hasChildren = doc.children && doc.children?.length > 0; return (
  • {hasChildren ? (
    {doc.title}
    setIsExpanded(!isExpanded)} > {isExpanded ? ( ) : ( )}
    ) : ( {doc.title} )} {doc.children && doc.children?.length > 0 && isExpanded && }
  • ); } function ListTree({ docs }: { docs: Doc[] }) { return ( ); } export default function SideBar({ version, }: { version: DocsStructure; }) { const { theme, setTheme } = useThemeContext(); return (

    Onspring {' '} API

    ); }