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