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

@@ -18,7 +18,7 @@ const Title = styled("h1", {
},
});
const Link = styled("a", {
const Link = styled(NextLink, {
color: "$text",
textDecoration: "none",
});
@@ -27,15 +27,13 @@ export type NoteTitleProps = Pick<NoteFrontMatter, "slug" | "htmlTitle"> & Compo
const NoteTitle = ({ slug, htmlTitle, ...rest }: NoteTitleProps) => (
<Title {...rest}>
<NextLink
<Link
href={{
pathname: "/notes/[slug]/",
query: { slug },
}}
passHref={true}
>
<Link dangerouslySetInnerHTML={{ __html: htmlTitle }} />
</NextLink>
dangerouslySetInnerHTML={{ __html: htmlTitle }}
/>
</Title>
);