Skip to content

Commit

Permalink
chore: remove warnings from test component
Browse files Browse the repository at this point in the history
  • Loading branch information
Dattaya committed Feb 7, 2021
1 parent 55be7a5 commit 9c841a7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion components/Img.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ const Img: React.FC<ImgProps> = ({ imgKey, img: imgProp = '/img.png' }) => {

return (
<>
<img id="img" width="300" height="300" {...imgProp} src={loading ? placeholder : img?.src} alt="" />
<img id="img" width="300" height="300" {...(typeof imgProp !== 'string' ? imgProp : {})} src={loading ? placeholder : img?.src} alt="" />
<Log message={loading ? 'loading' : 'not loading'} />
<div id="error">{error ? 'error' : ''}</div>
<div id="numOfRerenders">{++numOfRerenders.current}</div>
Expand Down

0 comments on commit 9c841a7

Please sign in to comment.