Skip to content

Commit

Permalink
Fix a bug in sidenav
Browse files Browse the repository at this point in the history
  • Loading branch information
hasparus committed Oct 17, 2024
1 parent 33df6ad commit 8ba7fc8
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/docs/src/components/sidenav.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,9 @@ export const AccordionButton = (props: {
onClick: EventHandler<MouseEvent<HTMLButtonElement>>
}) => {
const transform = props.open ? 'rotate(-180 8 8)' : 'rotate(0 8 8)'
const disabled = props.pathname ? props.pathname === props.href : false
const disabled = props.pathname
? props.href.startsWith(props.pathname)
: false

return (
<button
Expand Down

0 comments on commit 8ba7fc8

Please sign in to comment.