import { prisma } from '@/lib/db'; import { getSession } from '@/lib/auth'; import { redirect } from 'next/navigation'; import { Image as ImageIcon, Video, Upload } from 'lucide-react'; import { updateHeroMedia } from '../actions'; import { revalidatePath } from 'next/cache'; import { uploadImage } from '@/lib/cloudinary'; export default async function HeroAdminPage() { const session = await getSession(); if (!session) redirect('/admin/login'); const heroMediaList = await prisma.heroMedia.findMany(); const currentHero = heroMediaList.length > 0 ? heroMediaList[0] : null; return (