Skip to content

Commit

Permalink
Wrap preview images in a <Box> with static width/height to keep thing…
Browse files Browse the repository at this point in the history
…s from dancing while loading
  • Loading branch information
pepopowitz committed Feb 21, 2019
1 parent b1794b7 commit 84b9595
Showing 1 changed file with 9 additions and 11 deletions.
20 changes: 9 additions & 11 deletions src/Components/Search/Previews/Grids/PreviewGridItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,17 +28,15 @@ export const PreviewGridItem: React.SFC<PreviewGridItemProps> = ({
return (
<Flex mr={2} mb={2}>
<Link href={artwork.href} noUnderline>
{imageUrl ? (
<Image
mr={2}
src={imageUrl}
alt={`${artwork.title} by ${artwork.artist_names}`}
/>
) : (
<Box width="40px" height="40px" mr={2}>
&nbsp;
</Box>
)}
<Box width="40px" height="40px" mr={2}>
{imageUrl && (
<Image
mr={2}
src={imageUrl}
alt={`${artwork.title} by ${artwork.artist_names}`}
/>
)}
</Box>
</Link>
<Link href={artwork.href} noUnderline>
<Box>
Expand Down

0 comments on commit 84b9595

Please sign in to comment.