Przeglądaj źródła

wrap with next/link

Yuki Takei 3 lat temu
rodzic
commit
0946dd96b5

+ 5 - 3
packages/app/src/components/ReactMarkdownComponents/NextLink.tsx

@@ -34,9 +34,11 @@ export const NextLink = ({
   if (isAnchorLink(href)) {
   if (isAnchorLink(href)) {
     const to = href.slice(1);
     const to = href.slice(1);
     return (
     return (
-      <ScrollLink href={href} to={to} className={className} spy smooth="easeOutQuart" offset={-100} duration={800}>
-        {children}
-      </ScrollLink>
+      <Link href={href} scroll={false}>
+        <ScrollLink href={href} to={to} className={className} smooth="easeOutQuart" offset={-100} duration={800}>
+          {children}
+        </ScrollLink>
+      </Link>
     );
     );
   }
   }