feat: integrate Cloudinary image upload, Instagram Feed, and fix Next.js warnings
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
import { getGalleryImages } from "@/app/actions/gallery";
|
||||
import GalleryClient from "@/components/admin/GalleryClient";
|
||||
|
||||
export const dynamic = "force-dynamic";
|
||||
|
||||
export default async function GalleryPage() {
|
||||
const result = await getGalleryImages();
|
||||
const images = result.success && result.data ? result.data : [];
|
||||
|
||||
// Data parsing for Client Component
|
||||
const parsedImages = images.map(img => ({
|
||||
...img,
|
||||
createdAt: img.createdAt.toISOString(),
|
||||
updatedAt: img.updatedAt.toISOString(),
|
||||
}));
|
||||
|
||||
return <GalleryClient initialImages={parsedImages as any} />;
|
||||
}
|
||||
Reference in New Issue
Block a user