Skip to content

Commit

Permalink
Merge pull request #111 from AplinkosMinisterija/update-icon-colors
Browse files Browse the repository at this point in the history
undefined fix
  • Loading branch information
LWangllix authored Nov 13, 2024
2 parents 1b980c8 + d58d4fb commit 0f1a215
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/components/EventCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import Tag from './Tag';
const EventCard = ({ event, isOpen = false }: { event: Event; isOpen?: boolean }) => {
const [open, setOpen] = useState(isOpen);
const { app } = event;
const appIcon = svgToUrl(app.icon);
const appIcon = app?.icon ? svgToUrl(app?.icon) : '';
return (
<Container>
<PressableView onClick={() => setOpen(!open)}>
Expand All @@ -26,7 +26,7 @@ const EventCard = ({ event, isOpen = false }: { event: Event; isOpen?: boolean }
</InnerRow>
<Name>{event.name}</Name>
<InnerRow>
<Tag text={app.name} icon={<AppIcon src={appIcon} />} />
<Tag text={app?.name || '-'} icon={<AppIcon src={appIcon} />} />
</InnerRow>
</Column>
<div>
Expand Down

0 comments on commit 0f1a215

Please sign in to comment.