1
mirror of https://github.com/jakejarvis/jarv.is.git synced 2025-09-18 16:05:33 -04:00

bump next

This commit is contained in:
2022-09-05 18:42:00 -04:00
parent a819b3a568
commit 471f18690c
5 changed files with 698 additions and 704 deletions

View File

@@ -55,21 +55,15 @@ const Image = ({ src, width, height, quality = 60, placeholder, href, inline, ..
throw new TypeError("'src' should be a string or a valid StaticImageData object.");
}
const StyledImageWithProps = <StyledImage {...imageProps} />;
return inline ? (
StyledImageWithProps
const StyledImageWithProps = href ? (
<Link href={href} underline={false}>
<StyledImage {...imageProps} />
</Link>
) : (
<Block>
{href ? (
<Link href={href} underline={false}>
{StyledImageWithProps}
</Link>
) : (
StyledImageWithProps
)}
</Block>
<StyledImage {...imageProps} />
);
return inline ? StyledImageWithProps : <Block>{StyledImageWithProps}</Block>;
};
export default Image;