diff --git a/app/frontend/src/javascript/components/events/event-card.tsx b/app/frontend/src/javascript/components/events/event-card.tsx index 2becae562..4b7211c8d 100644 --- a/app/frontend/src/javascript/components/events/event-card.tsx +++ b/app/frontend/src/javascript/components/events/event-card.tsx @@ -6,6 +6,8 @@ import { Loader } from '../base/loader'; import { Event } from '../../models/event'; import FormatLib from '../../lib/format'; +import defaultImage from '../../../../images/default-image.png'; + declare const Application: IApplication; interface EventCardProps { @@ -60,7 +62,10 @@ export const EventCard: React.FC = ({ event, cardType }) => {
{event.event_image_attributes ?
- {event.event_image_attributes.attachment_name} + {event.event_image_attributes.attachment_name} { + currentTarget.onerror = null; + currentTarget.src = defaultImage; + }} />
: cardType !== 'sm' &&