fix unknown icon and country render link
This commit is contained in:
1 parent
d15bc58a1d
commit
b61e14962a
4 files changed
+21
-39
No files matched your search
@@ -12,9 +12,12 @@ export function TypeIcon({
|
||||
return (
|
||||
<>
|
||||
<img
|
||||
src={`${process.env.basePath || ''}/images/${type}/${
|
||||
value?.replaceAll(' ', '-').toLowerCase() || 'unknown'
|
||||
}.png`}
|
||||
src={`${process.env.basePath || ''}/images/${type}/${value
|
||||
?.replaceAll(' ', '-')
|
||||
.toLowerCase()}.png`}
|
||||
onError={e => {
|
||||
e.currentTarget.src = `${process.env.basePath || ''}/images/${type}/unknown.png`;
|
||||
}}
|
||||
alt={value}
|
||||
width={type === 'country' ? undefined : 16}
|
||||
height={type === 'country' ? undefined : 16}
|
||||
|
||||
Reference in new issue
Block a user