mirror of
https://github.com/cheeaun/phanpy.git
synced 2025-03-12 08:58:50 +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 && (
|
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
|
||||||
|
|
Loading…
Reference in a new issue