@@ -88,6 +88,9 @@ const CommunityEvents = () => {
8888 const { pastEventData, upcomingEventData, loading, hasError } =
8989 useCommunityEvents ( )
9090
91+ const reversedUpcomingEventData = upcomingEventData . slice ( ) . reverse ( )
92+ const reversedPastEventData = pastEventData . slice ( ) . reverse ( )
93+
9194 return (
9295 < Flex
9396 w = "full"
@@ -133,13 +136,16 @@ const CommunityEvents = () => {
133136 < Text color = "error.base" >
134137 < Translation id = "loading-error-try-again-later" />
135138 </ Text >
136- ) : upcomingEventData . length ? (
139+ ) : reversedUpcomingEventData . length ? (
137140 < Box flex = { 1 } >
138141 < Text fontSize = "3xl" fontWeight = "bold" lineHeight = { 1.4 } >
139- { upcomingEventData [ 0 ] . title }
142+ { reversedUpcomingEventData [ 0 ] . title }
140143 </ Text >
141144 < Text m = { 0 } fontSize = "xl" >
142- { renderEventDateTime ( upcomingEventData [ 0 ] . date , language ) }
145+ { renderEventDateTime (
146+ reversedUpcomingEventData [ 0 ] . date ,
147+ language
148+ ) }
143149 </ Text >
144150 < Text color = "body.medium" fontSize = "md" >
145151 ({ Intl . DateTimeFormat ( ) . resolvedOptions ( ) . timeZone } )
@@ -159,9 +165,9 @@ const CommunityEvents = () => {
159165 < Icon as = { FaDiscord } fontSize = { 25 } />
160166 Join Discord
161167 </ ButtonLink >
162- { upcomingEventData [ 0 ] && (
168+ { reversedUpcomingEventData [ 0 ] && (
163169 < InlineLink
164- to = { upcomingEventData [ 0 ] . calendarLink }
170+ to = { reversedUpcomingEventData [ 0 ] . calendarLink }
165171 onClick = { ( ) => matomoEvent ( "Add to calendar" ) }
166172 fontWeight = { 700 }
167173 >
@@ -190,8 +196,8 @@ const CommunityEvents = () => {
190196 < Text color = "error.base" >
191197 < Translation id = "loading-error-try-again-later" />
192198 </ Text >
193- ) : upcomingEventData . slice ( 1 ) . length ? (
194- upcomingEventData . slice ( 1 ) . map ( ( item ) => {
199+ ) : reversedUpcomingEventData . slice ( 1 ) . length ? (
200+ reversedUpcomingEventData . slice ( 1 ) . map ( ( item ) => {
195201 return < Event event = { item } language = { language } type = "upcoming" />
196202 } )
197203 ) : (
@@ -211,8 +217,8 @@ const CommunityEvents = () => {
211217 < Text color = "error.base" >
212218 < Translation id = "loading-error-try-again-later" />
213219 </ Text >
214- ) : pastEventData . length ? (
215- pastEventData . map ( ( item ) => {
220+ ) : reversedPastEventData . length ? (
221+ reversedPastEventData . map ( ( item ) => {
216222 return < Event event = { item } language = { language } type = "past" />
217223 } )
218224 ) : (
0 commit comments