Skip to content

Commit 86dbec5

Browse files
committed
Added a default img
1 parent 6fc75e3 commit 86dbec5

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

src/components/ProjectList/ProjectsCards.jsx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import React from "react";
22
import "./css/project-cards.css";
3+
import defaultLogo from './default.png';
34

45
const Card = ({
56
projectLink,
@@ -26,6 +27,9 @@ const Card = ({
2627
className="Project-Logo"
2728
alt="the framework or language that the project is build upon"
2829
src={logoLink}
30+
onError={(e) => {
31+
e.target.src = defaultLogo;
32+
}}
2933
/>
3034
<p className="Card-Title">{name}</p>
3135
</div>
45.4 KB
Loading

0 commit comments

Comments
 (0)