1
mirror of https://github.com/jakejarvis/jarv.is.git synced 2025-07-21 06:21:17 -04:00

refactor component/page function returns

This commit is contained in:
2022-05-25 09:30:11 -04:00
parent ff96ccae44
commit 1e1ecd89ea
31 changed files with 2347 additions and 2281 deletions

View File

@@ -25,16 +25,18 @@ const Link = styled(NextLink, {
export type NoteTitleProps = Pick<NoteFrontMatter, "slug" | "htmlTitle"> & ComponentProps<typeof Title>;
const NoteTitle = ({ slug, htmlTitle, ...rest }: NoteTitleProps) => (
<Title {...rest}>
<Link
href={{
pathname: "/notes/[slug]/",
query: { slug },
}}
dangerouslySetInnerHTML={{ __html: htmlTitle }}
/>
</Title>
);
const NoteTitle = ({ slug, htmlTitle, ...rest }: NoteTitleProps) => {
return (
<Title {...rest}>
<Link
href={{
pathname: "/notes/[slug]/",
query: { slug },
}}
dangerouslySetInnerHTML={{ __html: htmlTitle }}
/>
</Title>
);
};
export default NoteTitle;