continue Event page
This commit is contained in:
@@ -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} />;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user