Co-authored-by: renee-png <262607627+renee-png@users.noreply.github.com>
This commit is contained in:
gpt-engineer-app[bot]
2026-04-17 01:46:05 +00:00
co-authored by renee-png
parent 3483e065ec
commit 1c3c35c206
2 changed files with 2 additions and 11 deletions
-9
View File
@@ -469,12 +469,3 @@ const rootRouteChildren: RootRouteChildren = {
export const routeTree = rootRouteImport
._addFileChildren(rootRouteChildren)
._addFileTypes<FileRouteTypes>()
import type { getRouter } from './router.tsx'
import type { createStart } from '@tanstack/react-start'
declare module '@tanstack/react-start' {
interface Register {
ssr: true
router: Awaited<ReturnType<typeof getRouter>>
}
}
@@ -45,7 +45,7 @@ function TemplateDetailPage() {
setName(data.name);
setDescription(data.description ?? "");
setBody(data.body ?? "");
setFields(Array.isArray(data.fields) ? data.fields : []);
setFields(Array.isArray(data.fields) ? (data.fields as unknown as FieldDef[]) : []);
setDocName(data.name);
});
}, [templateId]);
@@ -55,7 +55,7 @@ function TemplateDetailPage() {
const saveTemplate = async () => {
setSaving(true);
const { error } = await supabase.from("document_templates").update({
name: name.trim(), description: description.trim() || null, body, fields,
name: name.trim(), description: description.trim() || null, body, fields: fields as any,
}).eq("id", templateId);
setSaving(false);
if (error) toast.error(error.message); else toast.success("Saved");