mirror of
https://github.com/jakejarvis/jarv.is.git
synced 2025-07-21 07:01:19 -04:00
fix page titles
This commit is contained in:
@@ -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>
|
||||
);
|
||||
|
Reference in New Issue
Block a user