Files
panel/src/app/tasks/templates/[id]/edit/page.js

18 lines
469 B
JavaScript

import db from "@/lib/db";
import { notFound } from "next/navigation";
import EditTaskTemplateClient from "@/components/EditTaskTemplateClient";
export default async function EditTaskTemplatePage({ params }) {
const { id } = await params;
// Fetch the task template
const template = db
.prepare("SELECT * FROM tasks WHERE task_id = ? AND is_standard = 1")
.get(id);
if (!template) {
notFound();
}
return <EditTaskTemplateClient template={template} />;
}