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

fix page titles

This commit is contained in:
2022-02-05 15:52:57 -05:00
parent 42a7ff1bdc
commit 4e7f235ed5

View File

@@ -8,14 +8,14 @@ import styles from "./PageTitle.module.css";
type Props = HTMLAttributes<HTMLHeadingElement>;
const PageTitle = ({ className, ...rest }: Props) => {
const PageTitle = ({ className, children, ...rest }: Props) => {
const router = useRouter();
const canonical = `${baseUrl}${router.pathname}/`;
return (
<h1 className={classNames(styles.title, className)} {...rest}>
<Link href={canonical}>
<a className={styles.link} />
<a className={styles.link}>{children}</a>
</Link>
</h1>
);