Create event edit page
This commit is contained in:
parent
0dcfea64b2
commit
6f316c0752
22
app/routes/events-team_.edit-event_.$id.tsx
Normal file
22
app/routes/events-team_.edit-event_.$id.tsx
Normal file
@ -0,0 +1,22 @@
|
||||
import { Button, Container, Textarea } from "@chakra-ui/react";
|
||||
import { type LoaderFunctionArgs } from "@remix-run/cloudflare";
|
||||
|
||||
export function meta() {
|
||||
return [
|
||||
{
|
||||
title: "Edit Event"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
export async function loader({ context, params }: { context: RequestContext, params: LoaderFunctionArgs & { id: string } }) {
|
||||
const eventData = await context.env.D1.prepare("SELECT answer, created_by, day, details, month, year WHERE id = ?;").bind(params.id);
|
||||
|
||||
if (!eventData) throw new Response(null, {
|
||||
status: 404,
|
||||
});
|
||||
}
|
||||
|
||||
export default function () {
|
||||
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user