fix(ui): check for null card type
This commit is contained in:
parent
b83d8db2a9
commit
7a17a08a6e
1 changed files with 1 additions and 1 deletions
|
|
@ -23,7 +23,7 @@ function MetricTypeIcon({ type }: any) {
|
||||||
const [card, setCard] = useState<any>('');
|
const [card, setCard] = useState<any>('');
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
const t = TYPES.find((i) => i.slug === type);
|
const t = TYPES.find((i) => i.slug === type);
|
||||||
setCard(t);
|
setCard(t || {});
|
||||||
}, [type]);
|
}, [type]);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue