1
mirror of https://github.com/jakejarvis/jarv.is.git synced 2025-07-21 07:21:17 -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

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;