From 6cdced4dfcddc47196d5e1bf0074473c77251fcd Mon Sep 17 00:00:00 2001 From: "Gustavo A. Salazar" Date: Fri, 6 May 2022 09:38:33 +0100 Subject: [PATCH] memberDB svg icon for deleted entries --- src/components/Entry/MemberSymbol/index.js | 12 ++++++++---- src/components/Entry/MemberSymbol/style.css | 7 +++++++ 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/src/components/Entry/MemberSymbol/index.js b/src/components/Entry/MemberSymbol/index.js index fb8139917..90d09bc98 100644 --- a/src/components/Entry/MemberSymbol/index.js +++ b/src/components/Entry/MemberSymbol/index.js @@ -141,6 +141,7 @@ const classNames = new Map([ ['TIGRFAMS', f('md-ti')], ['NEW', f('md-new')], ['ALL', f('md-all')], + ['REMOVED', f('md-removed')], ]); const MemberSymbol = ( @@ -155,12 +156,15 @@ const MemberSymbol = ( const [png, setPng] = useState(null); const [avif, setAvif] = useState(null); if (!svg) { - images[type][0].then((src) => setAvif(src.default)); - images[type][1].then((src) => setPng(src.default)); + images?.[type]?.[0].then((src) => setAvif(src.default)); + images?.[type]?.[1].then((src) => setPng(src.default)); } return ( - - {svg ? ( + + {svg || (!png && !avif) ? (