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

custom <Image /> wrapper now supports static imports too

This commit is contained in:
2022-01-24 08:57:21 -05:00
parent 5d402bc31b
commit 51ecae3c9b
22 changed files with 289 additions and 355 deletions

View File

@@ -0,0 +1,25 @@
import { memo } from "react";
import Link from "next/link";
import Image from "next/image";
import classNames from "classnames";
import styles from "./Selfie.module.css";
import meJpg from "../../public/static/images/me.jpg";
type Props = {
className?: string;
};
const Selfie = ({ className }: Props) => (
<Link href="/">
<a className={classNames(styles.link, className)}>
<div className={styles.selfie}>
<Image src={meJpg} alt="Photo of Jake Jarvis" width={70} height={70} quality={60} layout="intrinsic" priority />
</div>
<span className={styles.name}>Jake Jarvis</span>
</a>
</Link>
);
export default memo(Selfie);