Add fallback image if banner image failed

This commit is contained in:
Lim Chee Aun 2023-03-10 19:00:20 +08:00
parent 8100a90421
commit 4f41cc0f27

View file

@ -123,7 +123,14 @@ function Account({ account, instance: propInstance, onClose }) {
info && ( info && (
<> <>
{header && !/missing\.png$/.test(header) && ( {header && !/missing\.png$/.test(header) && (
<img src={header} alt="" class="header-banner" /> <img
src={header}
alt=""
class="header-banner"
onError={(e) => {
e.target.src = headerStatic;
}}
/>
)} )}
<header> <header>
<AccountBlock <AccountBlock