Skip to content

Commit

Permalink
fix: TOC links
Browse files Browse the repository at this point in the history
  • Loading branch information
r3yc0n1c committed Jan 10, 2025
1 parent 67b292a commit 175484c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions components/TOC.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ export default function TOC({ className, cssBreakingPoint = 'xl', toc, contentSe
</div>
<div className={`${!open && 'hidden'} ${cssBreakingPoint === 'xl' ? 'xl:block' : 'lg:block'}`}>
<Scrollspy
items={tocItems.map((item) => item.slug)}
items={tocItems.map((item) => item.slugWithATag)}
currentClassName='text-primary-500 font-bold'
componentTag='div'
rootEl={contentSelector}
Expand All @@ -85,7 +85,7 @@ export default function TOC({ className, cssBreakingPoint = 'xl', toc, contentSe
<a
className={`pl-${2 ** (item.lvl - 1)} font-normal mb-1 block font-sans text-sm
text-gray-900 antialiased transition duration-100 ease-in-out hover:underline`}
href={`#${item.slug}`}
href={`#${item.slugWithATag}`}
key={index}
data-testid='TOC-Link'
>
Expand Down

0 comments on commit 175484c

Please sign in to comment.