File tree Expand file tree Collapse file tree 2 files changed +17
-1
lines changed Expand file tree Collapse file tree 2 files changed +17
-1
lines changed Original file line number Diff line number Diff line change @@ -48,6 +48,10 @@ const EventCard: React.FC<EventCardProps> = ({
48
48
< img
49
49
src = { imageUrl }
50
50
alt = { title }
51
+ onError = { ( e ) => {
52
+ e . currentTarget . onerror = null
53
+ e . currentTarget . src = EventFallback . src
54
+ } }
51
55
className = "max-h-[224px] w-full object-cover xl:h-[124px]"
52
56
/>
53
57
) : (
Original file line number Diff line number Diff line change @@ -727,7 +727,15 @@ const HomePage = ({
727
727
>
728
728
< CardBanner >
729
729
{ /* eslint-disable-next-line @next/next/no-img-element */ }
730
- < img src = { imgSrc } alt = "" loading = "lazy" />
730
+ < img
731
+ src = { imgSrc }
732
+ alt = ""
733
+ loading = "lazy"
734
+ onError = { ( e ) => {
735
+ e . currentTarget . onerror = null
736
+ e . currentTarget . src = EventFallback . src
737
+ } }
738
+ />
731
739
</ CardBanner >
732
740
< CardContent >
733
741
< CardTitle > { title } </ CardTitle >
@@ -808,6 +816,10 @@ const HomePage = ({
808
816
< img
809
817
src = { imageUrl }
810
818
alt = ""
819
+ onError = { ( e ) => {
820
+ e . currentTarget . onerror = null
821
+ e . currentTarget . src = EventFallback . src
822
+ } }
811
823
className = "max-w-full object-cover object-center"
812
824
loading = "lazy"
813
825
/>
You can’t perform that action at this time.
0 commit comments