fix: serialize photo dates for Gallery props
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
+5
-1
@@ -21,6 +21,10 @@ async function getRecentPhotos() {
|
||||
|
||||
export default async function HomePage() {
|
||||
const photos = await getRecentPhotos();
|
||||
const serializedPhotos = photos.map((photo) => ({
|
||||
...photo,
|
||||
createdAt: photo.createdAt.toISOString(),
|
||||
}));
|
||||
|
||||
return (
|
||||
<div className="relative min-h-screen overflow-hidden">
|
||||
@@ -34,7 +38,7 @@ export default async function HomePage() {
|
||||
<main>
|
||||
<Hero />
|
||||
<UploadZone />
|
||||
<Gallery initialPhotos={photos} />
|
||||
<Gallery initialPhotos={serializedPhotos} />
|
||||
<Features />
|
||||
</main>
|
||||
<Footer />
|
||||
|
||||
Reference in New Issue
Block a user