src/components/sidebar-stack/sidebar-click-handler.tsx'use client'import type { ReactNode } from 'react'import { useSidebarStack } from './context'export interface SidebarClickHandlerProps {children: ReactNodeclassName?: string}/*** Wraps content and intercepts clicks on SidebarLink elements.* Uses event delegation to push sidebar items without requiring* hooks in the SidebarLink component itself.*/export function SidebarClickHandler({children,className,}: SidebarClickHandlerProps) {const { push } = useSidebarStack()
Showing the first 20 lines.
Get full code