mirror of
https://github.com/jakejarvis/jarv.is.git
synced 2025-07-21 07:01:19 -04:00
fix unnoticeable background color bug in dark mode
This commit is contained in:
@@ -2,22 +2,20 @@ import { useRouter } from "next/router";
|
||||
import Link from "next/link";
|
||||
import classNames from "classnames";
|
||||
import { baseUrl } from "../../lib/config";
|
||||
import type { PropsWithChildren } from "react";
|
||||
import type { HTMLAttributes } from "react";
|
||||
|
||||
import styles from "./PageTitle.module.css";
|
||||
|
||||
type Props = PropsWithChildren<{
|
||||
className?: string;
|
||||
}>;
|
||||
type Props = HTMLAttributes<HTMLHeadingElement>;
|
||||
|
||||
const PageTitle = ({ className, ...rest }: Props) => {
|
||||
const router = useRouter();
|
||||
const canonical = `${baseUrl}${router.pathname}/`;
|
||||
|
||||
return (
|
||||
<h1 className={classNames(styles.title, className)}>
|
||||
<h1 className={classNames(styles.title, className)} {...rest}>
|
||||
<Link href={canonical}>
|
||||
<a className={styles.link} {...rest} />
|
||||
<a className={styles.link} />
|
||||
</Link>
|
||||
</h1>
|
||||
);
|
||||
|
Reference in New Issue
Block a user