--- import type { HTMLAttributes } from 'astro/types' type Props = HTMLAttributes<'a'> const { href, class: className, ...props } = Astro.props const { pathname } = Astro.url // eslint-disable-next-line no-useless-escape const subpath = pathname.match(/[^\/]+/g) const isActive = href === pathname || href === '/' + subpath?.[0] ---