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() {
|
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 />
|
||||||
|
|||||||
Reference in New Issue
Block a user