Skip to content

Commit

Permalink
fix: swap src and srcSet order
Browse files Browse the repository at this point in the history
  • Loading branch information
igordanchenko committed May 14, 2022
1 parent 4714543 commit 46114de
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/renderers/PhotoRenderer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ const srcSetAndSizes = <T extends Photo = Photo>(photo: T, layout: PhotoLayout,

const defaultRenderPhoto = <T extends Photo = Photo>({ imageProps }: PhotoProps<T>) => {
const { src, alt, srcSet, sizes, ...rest } = imageProps;
return <img src={src} alt={alt} {...(srcSet ? { srcSet, sizes } : null)} {...rest} />;
return <img alt={alt} {...(srcSet ? { srcSet, sizes } : null)} src={src} {...rest} />;
};

type PhotoRendererProps<T extends Photo = Photo> = Omit<PhotoProps<T>, "imageProps"> & {
Expand Down

0 comments on commit 46114de

Please sign in to comment.