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:
@@ -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 }} />
|
||||
|
Reference in New Issue
Block a user