Skip to content

Commit

Permalink
Fixed type error
Browse files Browse the repository at this point in the history
  • Loading branch information
ekampf committed Apr 17, 2021
1 parent 76167fe commit a9ae6c2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions theme/src/components/mdx-components.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ function AnchorTag({ href, previews, ...restProps }: AnchorTagProps) {
type ImageProps = { src: string } & Omit<GatsbyImageProps, "image">;

function Image(props: ImageProps) {
const { src, ...rest } = props;
const { src, alt, ...rest } = props;
const data = useStaticQuery(graphql`
query ImageComponent {
images: allFile {
Expand All @@ -74,7 +74,7 @@ function Image(props: ImageProps) {
return null;
}

return <GatsbyImage loading="lazy" image={image.childImageSharp?.gatsbyImageData} {...rest} />;
return <GatsbyImage loading="lazy" image={image.childImageSharp?.gatsbyImageData} alt={alt} />;
}

export default {
Expand Down

0 comments on commit a9ae6c2

Please sign in to comment.