Skip to content

Commit

Permalink
Use NextImage for HomeHero Avatar
Browse files Browse the repository at this point in the history
  • Loading branch information
nathsimpson committed Apr 27, 2024
1 parent bc4d41e commit 1be92fb
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 5 deletions.
11 changes: 6 additions & 5 deletions components/Home/HomeHero.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { Flex, Stack } from '../ui/box';
import { TextLink } from '../TextLink';
import { useTheme } from '../../lib/theme';
import { Heading, Text } from '../ui/typography';
import Image from 'next/image';

export const HomeHero = () => {
const { maxWidth } = useTheme();
Expand Down Expand Up @@ -39,16 +40,16 @@ export const HomeHero = () => {

const Avatar = () => {
const { colors } = useTheme();
const size = '6rem';
const size = 96;
return (
<img
<Image
src="https://files.nathansimpson.design/avatar.jpeg"
alt="Nathan is smiling while sitting in a Ford Mustang."
width={size}
height={size}
css={{
width: size,
height: size,
borderRadius: size,
backgroundColor: colors.text.default
backgroundColor: colors.background.emphasis
}}
/>
);
Expand Down
8 changes: 8 additions & 0 deletions next.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,14 @@ const withMDX = nextMDX({
});

export default withMDX({
images: {
remotePatterns: [
{
protocol: 'https',
hostname: 'files.nathansimpson.design'
}
]
},
reactStrictMode: true,
swcMinify: true,
// Append the default value with md extensions
Expand Down

0 comments on commit 1be92fb

Please sign in to comment.