Add image upload function
This commit is contained in:
22
src/app/images/edit/[id]/page.tsx
Normal file
22
src/app/images/edit/[id]/page.tsx
Normal file
@ -0,0 +1,22 @@
|
||||
import EditGalleryForm from "@/components/galleries/edit/EditGalleryForm";
|
||||
import prisma from "@/lib/prisma";
|
||||
|
||||
export default async function GalleriesEditPage({ params }: { params: { id: string } }) {
|
||||
const { id } = await params;
|
||||
|
||||
const gallery = await prisma.gallery.findUnique({
|
||||
where: {
|
||||
id,
|
||||
},
|
||||
include: {
|
||||
albums: true
|
||||
}
|
||||
});
|
||||
|
||||
return (
|
||||
<div>
|
||||
<h1 className="text-2xl font-bold mb-4">Edit gallery</h1>
|
||||
{gallery ? <EditGalleryForm gallery={gallery} /> : 'Gallery not found...'}
|
||||
</div>
|
||||
);
|
||||
}
|
Reference in New Issue
Block a user