Skip to content

Commit b7a70b7

Browse files
committed
Fallback profile pic.
1 parent dbbd5f7 commit b7a70b7

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

frontend/src/modal/Profile.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,11 @@ const ProfileContent: React.FC = () => {
4343
<div className="avatar-background" style={{ backgroundImage: `url(${data?.banner_url})` }}>
4444
<div className="profile-column">
4545
<IonAvatar>
46-
<img src={data?.avatar_url} />
46+
<img
47+
src={data?.avatar_url ?? "/album-placeholder.png"}
48+
onError={(e) => ((e.target as HTMLImageElement).src = "/album-placeholder.png")}
49+
alt=""
50+
/>
4751
</IonAvatar>
4852
</div>
4953
<IonCard style={{ textAlign: "center", marginBottom: 50 }}>

0 commit comments

Comments
 (0)