test new next/link behavior

This commit is contained in:
jake committed 2022-05-17 18:31:58 -04:00
1 parent a2f4112e06
commit d1f0030d3c
8 files changed
+37 -60

No files matched your search

+6 -8
View File
@@ -20,7 +20,7 @@ const Image = styled(NextImage, {
},
});
const Link = styled("a", {
const Link = styled(NextLink, {
display: "inline-flex",
alignItems: "center",
color: "$mediumDark",
@@ -48,15 +48,13 @@ const Name = styled("span", {
},
});
export type SelfieProps = ComponentProps<typeof Link>;
export type SelfieProps = Omit<ComponentProps<typeof Link>, "href">;
const Selfie = ({ ...rest }: SelfieProps) => (
<NextLink href="/" passHref={true}>
<Link rel="author" title={authorName} {...rest}>
<Image src={selfieJpg} alt={`Photo of ${authorName}`} width={50} height={50} quality={60} layout="raw" priority />
<Name>{authorName}</Name>
</Link>
</NextLink>
<Link href="/" rel="author" title={authorName} {...rest}>
<Image src={selfieJpg} alt={`Photo of ${authorName}`} width={50} height={50} quality={60} layout="raw" priority />
<Name>{authorName}</Name>
</Link>
);
export default Selfie;