mirror of
https://github.com/umami-software/umami.git
synced 2026-02-19 03:55:37 +01:00
Fixes Missing icon for "(Unknown)"
This commit is contained in:
parent
60eaaaff60
commit
1434a51516
4 changed files with 5 additions and 2 deletions
Binary file not shown.
|
Before Width: | Height: | Size: 106 B After Width: | Height: | Size: 8.1 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 106 B After Width: | Height: | Size: 8.1 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 106 B After Width: | Height: | Size: 8.1 KiB |
|
|
@ -9,6 +9,9 @@ export function TypeIcon({
|
||||||
value: string;
|
value: string;
|
||||||
children?: ReactNode;
|
children?: ReactNode;
|
||||||
}) {
|
}) {
|
||||||
|
if (value === undefined) {
|
||||||
|
value = 'unknown';
|
||||||
|
}
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<img
|
<img
|
||||||
|
|
@ -19,8 +22,8 @@ export function TypeIcon({
|
||||||
e.currentTarget.src = `${process.env.basePath || ''}/images/${type}/unknown.png`;
|
e.currentTarget.src = `${process.env.basePath || ''}/images/${type}/unknown.png`;
|
||||||
}}
|
}}
|
||||||
alt={value}
|
alt={value}
|
||||||
width={type === 'country' ? undefined : 16}
|
width={16}
|
||||||
height={type === 'country' ? undefined : 16}
|
height={16}
|
||||||
/>
|
/>
|
||||||
{children}
|
{children}
|
||||||
</>
|
</>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue