Description
Multiple components reference event.eventCoverPhoto directly. With the new schema, cover photos are stored as Media entity references. Components need to handle the new data structure to display images correctly.
Components Affected:
- EventCard.tsx
- HomeEventsCard.tsx
- UpcomingEvent.tsx
- EventGetter.tsx
- event-detail/page.tsx
Tasks
Visual Aids
Expand ⬇️
Before:
<CardMedia image={event.eventCoverPhoto} />
After:
<CardMedia image={event.coverPhoto?.s3Url || event.eventCoverPhoto || defaultImage} />
</details>
Description
Multiple components reference event.eventCoverPhoto directly. With the new schema, cover photos are stored as Media entity references. Components need to handle the new data structure to display images correctly.
Components Affected:
Tasks
EventCard.tsxto useevent.coverPhoto?.s3Urlor mapped fieldHomeEventsCard.tsximage source handlingUpcomingEvent.tsximage source handlingEventGetter.tsximage source handlingevent-detail/page.tsxcover photo displayVisual Aids
Expand ⬇️
Before:
After: