1
mirror of https://github.com/jakejarvis/jarv.is.git synced 2025-11-28 15:53:50 -05:00

pass mdx images through next/image for full optimization benefits

This commit is contained in:
2022-01-09 22:53:10 -05:00
parent 32d1683e51
commit 6436a34c59
34 changed files with 256 additions and 180 deletions

View File

@@ -0,0 +1,19 @@
import Link from "next/link";
import type { LinkProps } from "next/link";
type CustomLinkProps = LinkProps & {
target?: string;
rel?: string;
className?: string;
children?: unknown;
};
const CustomLink = ({ href, target, rel, className, children }: CustomLinkProps) => (
<Link href={href} passHref={true}>
<a className={className} target={target} rel={rel}>
{children}
</a>
</Link>
);
export default CustomLink;