Skip to content

Commit 9c841a7

Browse files
committed
chore: remove warnings from test component
1 parent 55be7a5 commit 9c841a7

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

components/Img.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ const Img: React.FC<ImgProps> = ({ imgKey, img: imgProp = '/img.png' }) => {
2020

2121
return (
2222
<>
23-
<img id="img" width="300" height="300" {...imgProp} src={loading ? placeholder : img?.src} alt="" />
23+
<img id="img" width="300" height="300" {...(typeof imgProp !== 'string' ? imgProp : {})} src={loading ? placeholder : img?.src} alt="" />
2424
<Log message={loading ? 'loading' : 'not loading'} />
2525
<div id="error">{error ? 'error' : ''}</div>
2626
<div id="numOfRerenders">{++numOfRerenders.current}</div>

0 commit comments

Comments
 (0)