src/components/sidebar-stack/async-sidebar-renderer.tsx'use client'import { useRef, useEffect, useState, useCallback, type ReactNode } from 'react'import clsx from 'clsx'import xMarkIcon from '@iconify/icons-heroicons/x-mark'import { Icon } from '@/components/icon'import { useSidebarStack, type SidebarItem } from './context'/** Lock body scroll when sidebar is open */function useBodyScrollLock(isLocked: boolean) {useEffect(() => {if (!isLocked) returnconst original = document.body.style.overflowdocument.body.style.overflow = 'hidden'return () => {document.body.style.overflow = original}}, [isLocked])}
Showing the first 20 lines.
Get full code