1
mirror of https://github.com/jakejarvis/jarv.is.git synced 2026-04-19 04:35:29 -04:00

test new next/link behavior

This commit is contained in:
2022-05-17 18:31:58 -04:00
parent a2f4112e06
commit d1f0030d3c
8 changed files with 37 additions and 60 deletions
+4 -6
View File
@@ -1,7 +1,7 @@
import NextLink from "next/link";
import { styled } from "../../lib/styles/stitches.config";
const Link = styled("a", {
const Link = styled(NextLink, {
display: "inline-block",
color: "$mediumDark",
textDecoration: "none",
@@ -67,11 +67,9 @@ const MenuItem = ({ icon: ItemIcon, href, text, current, className }: MenuItemPr
// allow both navigational links and/or other interactive react components (e.g. the theme toggle)
if (href) {
return (
<NextLink href={href} prefetch={false} passHref={true}>
<Link className={className} current={current} title={text} aria-label={text}>
{linkContent}
</Link>
</NextLink>
<Link href={href} prefetch={false} className={className} current={current} title={text} aria-label={text}>
{linkContent}
</Link>
);
} else {
return linkContent;