fix: resolve Prisma Event type conflict with global DOM Event

- Renamed Event import to EventModel to avoid conflict with global DOM Event interface
- Updated type assertion to use EventModel[]
This commit is contained in:
2026-03-29 21:26:16 -07:00
parent c9415d490e
commit 4cd744f10c
+2 -2
View File
@@ -3,7 +3,7 @@ import Navigation from "@/components/Navigation"
import Link from "next/link" import Link from "next/link"
import { redirect } from "next/navigation" import { redirect } from "next/navigation"
import { getSession } from "@/lib/auth-simple" import { getSession } from "@/lib/auth-simple"
import { Event } from "@prisma/client" import type { Event as EventModel } from "@prisma/client"
export default async function AdminDashboard() { export default async function AdminDashboard() {
console.log('AdminDashboard rendering...') console.log('AdminDashboard rendering...')
@@ -54,7 +54,7 @@ export default async function AdminDashboard() {
take: 5, take: 5,
orderBy: { createdAt: "desc" }, orderBy: { createdAt: "desc" },
}), }),
]) as [number, number, number, Event[]] ]) as [number, number, number, EventModel[]]
return ( return (
<div className="min-h-screen bg-gray-50"> <div className="min-h-screen bg-gray-50">