Switch to <a> instead of next Link for aside (#85)

This commit is contained in:
Samy Pessé
2024-01-05 17:51:10 +01:00
committed by GitHub
parent ccfcaa590b
commit a1fca33947
@@ -1,6 +1,5 @@
'use client';
import Link from 'next/link';
import React from 'react';
import { useScrollActiveId } from '@/components/hooks';
@@ -32,7 +31,7 @@ export function ScrollSectionsList(props: { sections: DocumentSection[] }) {
<ul className={tcls('border-l', 'border-dark/2', 'dark:border-light/1', 'space-y-1')}>
{sections.map((section) => (
<li key={section.id} className={tcls('flex', 'flex-row')}>
<Link
<a
href={`#${section.id}`}
className={tcls(
'flex',
@@ -59,7 +58,7 @@ export function ScrollSectionsList(props: { sections: DocumentSection[] }) {
)}
>
{section.title}
</Link>
</a>
</li>
))}
</ul>