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

remove unnecessary react fragments

This commit is contained in:
2022-01-18 09:54:30 -05:00
parent a406010bd2
commit 5e9503b562
22 changed files with 142 additions and 125 deletions

View File

@@ -0,0 +1,24 @@
import { memo } from "react";
import { useRouter } from "next/router";
import Link from "next/link";
import type { ReactNode } from "react";
import styles from "./PageTitle.module.css";
type Props = {
children: ReactNode;
};
const PageTitle = ({ children }: Props) => {
const router = useRouter();
return (
<h1 className={styles.title}>
<Link href={router.asPath}>
<a>{children}</a>
</Link>
</h1>
);
};
export default memo(PageTitle);