Skip to content

Commit

Permalink
fix(sanity-plugin): fix type errors
Browse files Browse the repository at this point in the history
  • Loading branch information
good-idea committed Jul 12, 2020
1 parent 88d1101 commit d2ecd8f
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions packages/sanity-plugin/src/sanityObjects/shopifyImage.tsx
Original file line number Diff line number Diff line change
@@ -1,18 +1,19 @@
import * as React from 'react'
import { Paginated } from '@good-idea/unwind-edges'
import { ShopifyImage } from '@sane-shopify/types'
import { definitely } from '@sane-shopify/sync-utils'

interface ImagesPreviewProps {
value: Paginated<ShopifyImage>
}
const ImagesPreview = (props: ImagesPreviewProps) => {
return (
<>
{props.value.edges.map((edge) => (
{definitely(props.value.edges).map((edge) => (
<img
key={edge.cursor}
src={edge.node.transformedSrc}
alt={edge.node.altText}
key={edge.cursor || 'some-key'}
src={edge?.node?.transformedSrc}
alt={edge?.node?.altText}
/>
))}
</>
Expand Down

0 comments on commit d2ecd8f

Please sign in to comment.