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

organize types a bit more sanely & bump deps

This commit is contained in:
2022-02-24 07:06:34 -05:00
parent d24d29a04e
commit e6f1955efb
16 changed files with 267 additions and 645 deletions

View File

@@ -1,17 +1,17 @@
import Link from "next/link";
import classNames from "classnames";
import type { NoteMetaType } from "../../types";
import type { NoteType } from "../../types";
import styles from "./NoteTitle.module.css";
export type NoteTitleProps = Pick<NoteMetaType, "slug" | "htmlTitle"> & JSX.IntrinsicElements["h1"];
export type NoteTitleProps = Pick<NoteType["frontMatter"], "slug" | "htmlTitle"> & JSX.IntrinsicElements["h1"];
const NoteTitle = ({ slug, htmlTitle, className, ...rest }: NoteTitleProps) => (
<h1 className={classNames(styles.title, className)} {...rest}>
<Link
href={{
pathname: "/notes/[slug]/",
query: { slug: slug },
query: { slug },
}}
>
<a className={styles.link} dangerouslySetInnerHTML={{ __html: htmlTitle }} />