mirror of
https://github.com/cheeaun/phanpy.git
synced 2025-02-02 14:16:39 +01:00
Add fallback image if banner image failed
This commit is contained in:
parent
8100a90421
commit
4f41cc0f27
1 changed files with 8 additions and 1 deletions
|
@ -123,7 +123,14 @@ function Account({ account, instance: propInstance, onClose }) {
|
|||
info && (
|
||||
<>
|
||||
{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>
|
||||
<AccountBlock
|
||||
|
|
Loading…
Reference in a new issue