Skip to content

Commit

Permalink
Use ImageDataLike
Browse files Browse the repository at this point in the history
Added in: gatsbyjs/gatsby#30590

> ImageDataLike is an exported type, for cases where we want to create a
  component that takes the same argument as `getImage`, `getSrc` or `getSrcSet`,
  and so wants to reference the same type that these functions use.
  • Loading branch information
mnvr committed Jan 3, 2024
1 parent c59dd78 commit d87e0de
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/components/gen24/DayListing.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { graphql, useStaticQuery } from "gatsby";
import { GatsbyImage, getImage } from "gatsby-plugin-image";
import { GatsbyImage, type ImageDataLike, getImage } from "gatsby-plugin-image";
import * as React from "react";
import styled from "styled-components";
import { ensure } from "utils/ensure";
Expand Down Expand Up @@ -69,7 +69,7 @@ const Image_ = styled.div`
grid-area: 1 / 1;
`;

const images = () => {
const images = (): readonly ImageDataLike[] => {
const data = useStaticQuery<Queries.Gen24PreviewImagesQuery>(graphql`
query Gen24PreviewImages {
allFile(
Expand Down

0 comments on commit d87e0de

Please sign in to comment.