mirror of
https://github.com/BradNut/awesome-uses
synced 2025-09-08 17:40:31 +00:00
Add fallback image
This commit is contained in:
parent
76d65f14ff
commit
168387237e
3 changed files with 4 additions and 1 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
|
@ -56,7 +56,6 @@ typings/
|
|||
.env*
|
||||
|
||||
.cache/
|
||||
public
|
||||
|
||||
# Mac files
|
||||
.DS_Store
|
||||
|
|
|
|||
BIN
public/default.png
Normal file
BIN
public/default.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 755 B |
|
|
@ -20,6 +20,10 @@ export default function Person({ person }) {
|
|||
height="50"
|
||||
src={img}
|
||||
alt={person.name}
|
||||
onError={({ currentTarget }) => {
|
||||
currentTarget.onerror = null; // prevents looping
|
||||
currentTarget.src = "/default.png";
|
||||
}}
|
||||
loading="lazy"
|
||||
/>
|
||||
<h3>
|
||||
|
|
|
|||
Loading…
Reference in a new issue