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:
19
components/embeds/Link.tsx
Normal file
19
components/embeds/Link.tsx
Normal 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;
|
||||
Reference in New Issue
Block a user