Aller au contenu
CtrlK

findCurrentSidebarItem

Sur cette page
Cette référence API est générée à partir des commentaires TypeScript en anglais. Les noms, signatures et exemples correspondent au paquet publié.

Find the current sidebar item based on the current path. This is client-safe and does not use any Node.js modules.

import { findCurrentSidebarItem } from "ardo/runtime"

findCurrentSidebarItem(sidebar: SidebarItem[], currentPath: string): SidebarItem | undefined

Parameters

NameTypeRequired
sidebarSidebarItem[]Yes
currentPathstringYes

Returns

SidebarItem | undefined