continue Event page

This commit is contained in:
PxlLoewe
2025-02-17 10:39:29 +01:00
parent 8928455c3a
commit 30af30bd1d
13 changed files with 242 additions and 227 deletions

View File

@@ -1,13 +1,13 @@
import { prisma } from '@repo/db';
import { StationForm } from '../_components/Form';
import { Form } from '../_components/Form';
export default async ({ params }: { params: Promise<{ id: string }> }) => {
const { id } = await params;
const station = await prisma.station.findUnique({
const event = await prisma.event.findUnique({
where: {
id: parseInt(id),
},
});
if (!station) return <div>Station not found</div>;
return <StationForm station={station} />;
if (!event) return <div>Event not found</div>;
return <Form event={event} />;
};