--- interface Props { headings: Array<{ depth: number; slug: string; text: string; }>; class?: string; } const { headings, class: className = '' } = Astro.props; // Filter to only H2 and H3 headings const tocHeadings = headings.filter((h) => h.depth === 2 || h.depth === 3); --- {tocHeadings.length > 0 && ( )}