Refactor event date handling in EventsSection and PlayerStats components: Serialize event dates for consistent formatting and update date display to use localized string representation. Remove profile link from Navigation and integrate it into PlayerStats for improved user experience.
This commit is contained in:
@@ -11,11 +11,17 @@ export default async function Home() {
|
||||
take: 3,
|
||||
});
|
||||
|
||||
// Convert Date objects to strings for serialization
|
||||
const serializedEvents = events.map((event) => ({
|
||||
...event,
|
||||
date: event.date.toISOString(),
|
||||
}));
|
||||
|
||||
return (
|
||||
<main className="min-h-screen bg-black relative">
|
||||
<NavigationWrapper />
|
||||
<HeroSection />
|
||||
<EventsSection events={events} />
|
||||
<EventsSection events={serializedEvents} />
|
||||
</main>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user