--- import { ScrollArea } from '@/components/ui/scroll-area' import type { TOCSection } from '@/lib/data-utils' import { getParentId, isSubpost } from '@/lib/data-utils' import { cn, getHeadingMargin } from '@/lib/utils' type Props = { sections: TOCSection[] currentPostId: string } const { sections, currentPostId } = Astro.props const isCurrentSubpost = isSubpost(currentPostId) const parentId = isCurrentSubpost ? getParentId(currentPostId) : currentPostId --- { sections.length > 0 && (