Changes
Co-authored-by: renee-png <262607627+renee-png@users.noreply.github.com>
This commit is contained in:
co-authored by
renee-png
parent
3483e065ec
commit
1c3c35c206
@@ -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");
|
||||
|
||||
Reference in New Issue
Block a user