@@ -16,13 +16,14 @@ import Markdown from "markdown-to-jsx"
1616import { evaluate } from "nextra/components"
1717import { useCallback , useState , MouseEvent , useMemo , memo } from "react"
1818import { clsx } from "clsx"
19- import { Collapse , getComponents } from "nextra-theme-docs"
19+ import { Collapse , getComponents , useConfig } from "nextra-theme-docs"
2020import { RadioGroup , Radio } from "@/components/radio"
2121import { Button } from "@/app/conf/_design-system/button"
2222import { Tag } from "@/app/conf/_design-system/tag"
2323import SearchIcon from "@/app/conf/_design-system/pixelarticons/search.svg?svgr"
2424import CaretDown from "@/app/conf/_design-system/pixelarticons/caret-down.svg?svgr"
2525import { SidebarFooter } from "./sidebar"
26+ import { Breadcrumbs } from "../_design-system/breadcrumbs"
2627
2728type PackageInfo = {
2829 name : string
@@ -60,6 +61,7 @@ export function CodePage({ allTags, data }: CodePageProps) {
6061 [ ] ,
6162 )
6263
64+ const { activePath } = useConfig ( ) . normalizePagesResult
6365 const [ searchParams , setSearchParams ] = useSearchParamsState ( )
6466 const [ search , setSearch ] = useState ( "" )
6567 const normalizedSearch = useMemo ( ( ) => search . trim ( ) . toLowerCase ( ) , [ search ] )
@@ -88,21 +90,6 @@ export function CodePage({ allTags, data }: CodePageProps) {
8890 [ setSearchParams ] ,
8991 )
9092
91- const handleQuery = useCallback (
92- ( e : MouseEvent < HTMLAnchorElement | HTMLButtonElement > ) => {
93- e . preventDefault ( )
94- const tag = e . currentTarget . dataset . tag !
95-
96- updateTags ( prevTags => {
97- if ( prevTags . includes ( tag ) ) {
98- return prevTags . filter ( t => t !== tag )
99- }
100- return [ ...prevTags , tag ]
101- } )
102- } ,
103- [ updateTags ] ,
104- )
105-
10693 const mounted = useMounted ( )
10794
10895 const { newData, tagCounts } = useMemo ( ( ) => {
@@ -312,7 +299,6 @@ export function CodePage({ allTags, data }: CodePageProps) {
312299 } , [ selectedTags , allTagsMap ] )
313300
314301 const [ sort , setSort ] = useState ( "popularity" )
315- const [ isCollapsing , setIsCollapsing ] = useState ( false )
316302
317303 let description = `A collection of tools and libraries for GraphQL`
318304 let title = "Tools and Libraries | GraphQL"
@@ -336,6 +322,7 @@ export function CodePage({ allTags, data }: CodePageProps) {
336322 />
337323 </ NextHead >
338324 < div className = "gql-container gql-section pb-8" >
325+ < Breadcrumbs className = "" activePath = { activePath } />
339326 < div className = "relative mt-8 flex md:gap-8" >
340327 < aside >
341328 < Collapse horizontal isOpen = { showSidebar } >
0 commit comments