diff --git a/citrus/app/(organizers)/organizer/dashboard/[id]/page.tsx b/citrus/app/(organizers)/organizer/dashboard/[id]/page.tsx new file mode 100644 index 0000000..1c1965b --- /dev/null +++ b/citrus/app/(organizers)/organizer/dashboard/[id]/page.tsx @@ -0,0 +1,13 @@ +import EditEvent from "@/components/EditEvent"; +import { getServerSession } from "next-auth"; +import { authOptions } from "@/app/api/auth/[...nextauth]/route"; + +export default async function Page( {params}: { params: {id: string }}) { + const session = await getServerSession(authOptions); + const res = await fetch(process.env.BASE_API_URL + 'api/experiences/' + params.id); + const experience = await res.json(); + if (experience.org_id !== session?.user?.name) { + return