fix: serialize photo dates for Gallery props

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
orohi
2026-06-06 15:16:55 +03:00
parent 006cc40bb6
commit 5c5aa6caec
+5 -1
View File
@@ -21,6 +21,10 @@ async function getRecentPhotos() {
export default async function HomePage() { export default async function HomePage() {
const photos = await getRecentPhotos(); const photos = await getRecentPhotos();
const serializedPhotos = photos.map((photo) => ({
...photo,
createdAt: photo.createdAt.toISOString(),
}));
return ( return (
<div className="relative min-h-screen overflow-hidden"> <div className="relative min-h-screen overflow-hidden">
@@ -34,7 +38,7 @@ export default async function HomePage() {
<main> <main>
<Hero /> <Hero />
<UploadZone /> <UploadZone />
<Gallery initialPhotos={photos} /> <Gallery initialPhotos={serializedPhotos} />
<Features /> <Features />
</main> </main>
<Footer /> <Footer />