findCurrentSidebarItem
On this page
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
| Name | Type | Required |
|---|---|---|
sidebar | SidebarItem[] | Yes |
currentPath | string | Yes |
Returns
SidebarItem | undefined