From d05a426d00fa70823cbef665cd4ec8c44eff1185 Mon Sep 17 00:00:00 2001 From: ajbura Date: Sat, 5 Feb 2022 18:19:30 +0530 Subject: [PATCH] Fix avatar showing av when loading (#247) Signed-off-by: ajbura --- src/app/atoms/avatar/Avatar.jsx | 10 +++++++++- src/app/atoms/avatar/Avatar.scss | 1 + 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/src/app/atoms/avatar/Avatar.jsx b/src/app/atoms/avatar/Avatar.jsx index e5ce53c1..891637c9 100644 --- a/src/app/atoms/avatar/Avatar.jsx +++ b/src/app/atoms/avatar/Avatar.jsx @@ -21,7 +21,15 @@ function Avatar({
{ imageSrc !== null - ? { e.target.src = ImageBrokenSVG; }} alt="avatar" /> + ? ( + { e.target.style.backgroundColor = 'transparent'; }} + onError={(e) => { e.target.src = ImageBrokenSVG; }} + alt="" + /> + ) : (