36 lines
879 B
TypeScript
36 lines
879 B
TypeScript
import { db } from "@/db";
|
|
import { notFound } from "next/navigation";
|
|
import FormExtraClient from "./client";
|
|
|
|
export const dynamic = "force-dynamic";
|
|
|
|
export default async function AdminExtraPage(
|
|
props: {
|
|
params: Promise<{ id: string }>;
|
|
}
|
|
) {
|
|
const params = await props.params;
|
|
const form = await db.query.forms.findFirst({
|
|
where: (f, { eq }) => eq(f.id, params.id),
|
|
});
|
|
|
|
if (!form) {
|
|
return notFound();
|
|
}
|
|
|
|
return (
|
|
<div className="space-y-6 w-full max-w-6xl mx-auto p-4 md:p-6 pb-12">
|
|
<div className="flex items-center justify-between">
|
|
<div>
|
|
<h1 className="text-3xl font-bold tracking-tight">Extra Settings</h1>
|
|
<p className="text-muted-foreground mt-1">
|
|
Configure Discord webhook integrations.
|
|
</p>
|
|
</div>
|
|
</div>
|
|
|
|
<FormExtraClient form={form} />
|
|
</div>
|
|
);
|
|
}
|