'use client' import Sidebar from '../Sidebar/Sidebar' import TOC from '../TOC/TOC' import { useConfig } from 'nextra-theme-docs' import { usePathname } from 'next/navigation' import Link from 'next/link' import { PencilSimple } from '@phosphor-icons/react/dist/ssr' function Breadcrumb() { const config = useConfig() const { activePath } = config.normalizePagesResult if (!activePath || activePath.length <= 1) return null // Nextra emits both a folder entry and its index page with the same route // (e.g. /developers/migration appears twice once you open /developers/migration). // Collapse consecutive duplicates so React keys stay unique and the trail // does not show the same crumb twice. const trail = activePath.filter((item, i, arr) => { const next = arr[i + 1] return !next || next.route !== item.route }) return ( ) } function Pagination() { const config = useConfig() const { flatDocsDirectories, activeIndex } = config.normalizePagesResult const prev = activeIndex > 0 ? flatDocsDirectories[activeIndex - 1] : null const next = activeIndex < flatDocsDirectories.length - 1 ? flatDocsDirectories[activeIndex + 1] : null if (!prev && !next) return null return (
Try LearnHouse Cloud
Managed hosting with automatic updates, backups, and scaling.