diff --git a/apps/documentation/src/components/breadcrumbs/breadcrumbs.tsx b/apps/documentation/src/components/breadcrumbs/breadcrumbs.tsx index 847942a5..1d47d126 100644 --- a/apps/documentation/src/components/breadcrumbs/breadcrumbs.tsx +++ b/apps/documentation/src/components/breadcrumbs/breadcrumbs.tsx @@ -38,14 +38,16 @@ export function BreadcrumbElement({ href, label, }: BreadcrumbElementProps): JSX.Element { + if (href) { + return ( + + ) + } + return ( - ) diff --git a/apps/documentation/src/components/sidebar/sidebar-link.tsx b/apps/documentation/src/components/sidebar/sidebar-link.tsx index facab497..a1a662a5 100644 --- a/apps/documentation/src/components/sidebar/sidebar-link.tsx +++ b/apps/documentation/src/components/sidebar/sidebar-link.tsx @@ -18,28 +18,29 @@ export default function SidebarLink( const { pathname } = useRouter() const [isOpen, setIsOpen] = useState(!!props.defaultOpened) - return ( - { - e.preventDefault() - e.stopPropagation() - setIsOpen((state) => !state) - }} - /> - ) - } - opened={isOpen} - autoContrast - {...props} - /> - ) + const internalProps = { + active: pathname === props.href, + className: styles.link, + rightSection: props.children && ( + { + e.preventDefault() + e.stopPropagation() + setIsOpen((state) => !state) + }} + /> + ), + opened: isOpen, + autoContrast: true, + ...props, + } + + if (props.href.startsWith('#')) { + return + } + + return }