"use client" import clsx from "clsx" import React from "react" import { CopyButton } from "@/components/CopyButton" import { Link } from "@/components/Link" import { useHeadingUrl } from "../../../hooks/use-heading-url" import { useLayout } from "../../../providers/Layout" export type H2Props = React.HTMLAttributes & { id?: string passRef?: React.RefObject } export const H2 = ({ className, children, passRef, ...props }: H2Props) => { const { showCollapsedNavbar } = useLayout() const copyText = useHeadingUrl({ id: props.id || "", }) return (

{children} {props.id && ( # )}

) }